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

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.

主站蜘蛛池模板: 南岸区| 江津市| 仁化县| 友谊县| 麻城市| 长寿区| 中西区| 石柱| 延寿县| 南宁市| 高唐县| 镇原县| 镇康县| 万全县| 甘肃省| 绥宁县| 兰西县| 尚义县| 报价| 得荣县| 宁夏| 讷河市| 泰州市| 韶山市| 丹棱县| 绩溪县| 定州市| 徐闻县| 民县| 阿鲁科尔沁旗| 新丰县| 连城县| 甘谷县| 沈丘县| 苏尼特左旗| 东港市| 泰顺县| 鹤庆县| 尉氏县| 丹东市| 迁安市|