Course Information
Course Overview
All about exceptions handling and safety in C++
While writing and running software, sooner or later exceptions or some other form of errors are unavoidable, whether expected or not, resulting from issues in our code or user actions, etc. Hence, we must be prepared for exceptions / errors and know how to handle them properly (whether gracefully or failing fast) to recover from or at least not exacerbate problems in our programs, including those written in languages like C++.
So, if you’ve just learned the basics of C++ and haven’t dived into exceptions yet or worked with C++ for a while but need to brush up on exceptions, then this course is for you. It’s about exceptions handling in C++, including theory, syntax and best practices. The course covers C++ standards 11-17.
By the end of this course you will learn
Throwing and catching exceptions and their limitations;
Stack unwinding;
Pitfalls when throwing in constructors and destructors;
Re-throwing and nested exceptions;
User-defined and standard exceptions;
Dynamic exceptions specification;
Noexcept specifier and noexcept operator;
Recommendations on error handling from C++ Core Guidelines.
Moreover, and probably most importantly, you will learn how to reason about exception safety of your code and exception safety guarantees, a concept that will help you write robust code in C++ and other similar languages.
So what exactly is covered in the course?
Lectures with code examples and explanations;
Summaries in PDF files from each lecture for those who prefer reading and to be able to quickly to back to specific topics and recap;
References to relevant C++ Core Guidelines about error handling;
Quizzes with questions to check your knowledge.
What is expected from you?
Please note that this course is not for complete beginners. At least basic C++ skills are required. And you should be able to read and understand C++ code examples of low to medium complexity and size that we cover in lectures.
So, does that sound like this course is for you? If yes, without further to do, enroll and I will see you in the course.
The images in visual examples are from website pixabay and the audio in videos is from website bensound.
Course Content
- 8 section(s)
- 35 lecture(s)
- Section 1 Throwing and catching exceptions
- Section 2 Re-throwing and nested exceptions
- Section 3 User defined and standard exceptions
- Section 4 Dynamic exception specification
- Section 5 Noexcept specifier
- Section 6 Noexcept operator
- Section 7 Exception safety guarantees
- Section 8 Exercise and additional materials
What You’ll Learn
- Learn and/or refresh C++ exceptions syntax
- Know how to throw and catch exceptions and what their limitations are
- Discover pitfalls of throwing in constructors and destructors
- Understand how stack unwinding works and why it's important to exceptions
- How to create and throw/re-throw user-defined and standard exceptions
- Dynamic exceptions specification, noexcept specifier and noexcept operator
- Learn about exception safety guarantees
- How to reason about exception safety of your code
Reviews
-
kkhushabu Sunil Belsare
yes
-
KKomal Rohidas Tonde
nice
-
AAin Mor
Very good course.
-
VVishal Chovatiya
The course is unique in terms of its topic & exception should know topic in any programming language. Pros: - The topic touched upon up to date C++ standard covering C++11,14,17. - Most of the video has a downloadable example provided so that you can play along. - The course also includes CPP core guidelines. Cons: - Content should become more engaging. It seems that this is just examples discussion which is divided topic-wise. - Moreover, the author has a Russian accent. So I have to play videos on 1.0 speed & need too much focus. - Only a single exercise problem is given though out course rest is just quiz. Overall it's worth doing this course. I have taken both the course designed by Andrii Shostatskyi. By the way, I have also written an article on things I have learned, here: http://www.vishalchovatiya.com/7-best-practices-for-exception-handling-in-cpp-with-example/