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

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.

主站蜘蛛池模板: 新源县| 辽中县| 金川县| 无极县| 北辰区| 湘乡市| 富阳市| 新龙县| 商洛市| 平阴县| 隆德县| 将乐县| 南郑县| 武义县| 洞口县| 诸城市| 常熟市| 霞浦县| 灵寿县| 杭州市| 蓝山县| 清远市| 舒兰市| 鹤岗市| 滨海县| 驻马店市| 循化| 旺苍县| 安陆市| 阳西县| 灵宝市| 沅陵县| 寿宁县| 凤台县| 星子县| 大方县| 博兴县| 长治市| 广饶县| 瓮安县| 静乐县|