官术网_书友最值得收藏!

Chapter 3. Dealing with Errors

Errors happen. Having code that can handle errors properly is essential. In this chapter, we will learn how to write code that gracefully handles errors in Maya Python. We'll start by understanding some technical basics about Python exceptions, such as the try/except statement and tracebacks. After that we will cover some golden rules for handling exceptions. We will map those guidelines to the way Maya works, and learn how to handle errors in Maya gracefully. We will use all of this knowledge to build a high-level error handler. The error handler will be an exception hook that will capture any relevant unhandled Python exception raised in Maya, and send an e-mail to us. Finally, we'll look at various ways to improve the error handler to make it useful in a production environment.

主站蜘蛛池模板: 光山县| 德庆县| 兰溪市| 贞丰县| 丰县| 宁夏| 句容市| 昌吉市| 卓尼县| 泰宁县| 申扎县| 昌图县| 琼结县| 固阳县| 沁阳市| 黑水县| 吉隆县| 松江区| 邓州市| 姚安县| 鄂温| 万源市| 青神县| 股票| 交口县| 抚松县| 正阳县| 南郑县| 年辖:市辖区| 武平县| 临西县| 贡山| 德格县| 天长市| 晋江市| 多伦县| 新宁县| 黑龙江省| 葫芦岛市| 勃利县| 桓仁|