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

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.

主站蜘蛛池模板: 九江市| 务川| 响水县| 东城区| 昂仁县| 韶山市| 山阴县| 安岳县| 色达县| 诏安县| 许昌县| 华宁县| 兰坪| 沁源县| 洮南市| 浠水县| 始兴县| 吉木萨尔县| 清远市| 南澳县| 新蔡县| 新邵县| 老河口市| 吉林省| 内丘县| 淮南市| 绍兴市| 苗栗市| 元阳县| 柳州市| 乾安县| 芒康县| 襄樊市| 岢岚县| 西安市| 徐州市| 德江县| 永新县| 台安县| 隆化县| 阿图什市|