- Hands-On Embedded Programming with C++17
- Maya Posch
- 120字
- 2021-08-20 10:20:47
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.
推薦閱讀
- Learning SQL Server Reporting Services 2012
- 24小時學會電腦組裝與維護
- Arduino入門基礎教程
- Learning AngularJS Animations
- INSTANT Wijmo Widgets How-to
- Manage Partitions with GParted How-to
- 從零開始學51單片機C語言
- 筆記本電腦維修不是事兒(第2版)
- 電腦軟硬件維修從入門到精通
- Apple Motion 5 Cookbook
- 面向對象分析與設計(第3版)(修訂版)
- BeagleBone Robotic Projects
- Source SDK Game Development Essentials
- Neural Network Programming with Java(Second Edition)
- Managing Data and Media in Microsoft Silverlight 4:A mashup of chapters from Packt's bestselling Silverlight books