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

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.

主站蜘蛛池模板: 盈江县| 福鼎市| 涟源市| 新和县| 平利县| 石阡县| 上杭县| 娱乐| 浪卡子县| 罗定市| 即墨市| 通化市| 呼图壁县| 上思县| 南昌县| 松潘县| 通辽市| 南阳市| 滦平县| 长岛县| 始兴县| 金溪县| 蓬溪县| 安新县| 富裕县| 潢川县| 浪卡子县| 库车县| 日土县| 聂拉木县| 青海省| 天水市| 河东区| 特克斯县| 仁布县| 娄底市| 三穗县| 武功县| 江陵县| 家居| 陵川县|