In this final chapter, we will learn how to perform error handling while system programming. Specifically, three different methods will be presented. The first method will demonstrate how to use POSIX-style error handling, while the second method will demonstrate how to use the standard C-style set jump exceptions. The third method will demonstrate how to use C++ exceptions, and the pros and cons of each approach will be discussed. Finally, this chapter will conclude with an example that demonstrates how C++ exceptions outperform POSIX-style error handling.
In this chapter, we will cover the following topics:
- POSIX-style error handling
- Exception support in C++
- An example with Exception Benchmark