- 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
- 筆記本電腦使用、維護與故障排除實戰
- 用“芯”探核:龍芯派開發實戰
- 圖解西門子S7-200系列PLC入門
- SDL Game Development
- 極簡Spring Cloud實戰
- Creating Dynamic UI with Android Fragments
- Mastering Delphi Programming:A Complete Reference Guide
- BeagleBone By Example
- AMD FPGA設計優化寶典:面向Vivado/SystemVerilog
- Learning Stencyl 3.x Game Development Beginner's Guide
- Building 3D Models with modo 701
- VMware Workstation:No Experience Necessary
- “硬”核:硬件產品成功密碼
- Blender Game Engine:Beginner's Guide