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

Exception handling

Exceptions are commonly used on desktop platforms, providing a way to generate exceptions for error conditions, which can be caught and handled in try/catch blocks.

While exception support isn't expensive by itself, an exception being generated is relatively expensive, requiring a significant amount of CPU time and RAM to prepare and handle the exception. You have to also make sure to catch every exception, or risk having the application terminate without clear cause.

Exceptions versus the checking of return code for a method being called is something that has to be decided on a case-by-case basis, and can also be a matter of personal preference. It requires a quite different programming style, which may not work for everyone.

主站蜘蛛池模板: 砀山县| 山东| 连南| 伽师县| 哈尔滨市| 榆中县| 仙桃市| 崇礼县| 梁河县| 同江市| 太和县| 咸宁市| 会东县| 安泽县| 林口县| 河北省| 定州市| 德清县| 临清市| 公主岭市| 原平市| 沁阳市| 常德市| 宝清县| 阿坝| 彝良县| 泰宁县| 淮南市| 锡林浩特市| 定州市| 新晃| 绩溪县| 庆安县| 邹平县| 宣化县| 宣威市| 廊坊市| 扶绥县| 建湖县| 昭苏县| 禹城市|