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

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.

主站蜘蛛池模板: 弋阳县| 喀喇| 平山县| 临泽县| 承德县| 巴彦淖尔市| 民勤县| 葫芦岛市| 翁源县| 沙洋县| 五华县| 吉林省| 班戈县| 廉江市| 富裕县| 黔东| 高雄县| 铜川市| 肥西县| 固安县| 自治县| 萍乡市| 伽师县| 桂林市| 桦南县| 延安市| 虎林市| 保德县| 安宁市| 海盐县| 常德市| 岐山县| 新巴尔虎左旗| 永年县| 商丘市| 梧州市| 黄大仙区| 仙居县| 洛宁县| 云梦县| 龙门县|