Summary
In this chapter, we analyzed different error-handling strategies in C++. We went through error codes, global handlers, asserts, exceptions, std::optional
, and std::expected
. We learned the pros and cons of each and in which situations it makes sense to apply them.
In the next chapter, we will cover templates in more detail.
Join our community on Discord
Join our community’s Discord space for discussions with the author and other readers:
https://packt.link/embeddedsystems