Exception Handling in C++

C++ 20    |    Intermediate
  • 14 Videos | 1h 47m 52s
  • Includes Assessment
  • Earns a Badge
Exceptions are the most popular form of error handling and the try-catch block is superior to all other error handling mechanisms because it forces the invoking function to manage the errors. In this course, learn how exceptions are thrown and caught. Next, practice creating and using custom exception objects and discover why exceptions must be caught by reference. Finally, explore object slicing results, the semantics and limitations of the noexcept keyword, and the pitfalls of exceptions that occur within constructors. Upon completion, you'll be able to correctly throw and handle exceptions using try/catch blocks, enumerate semantics and limitations of the noexcept keyword, and mitigate problems related to exceptions thrown during the construction of an object.

WHAT YOU WILL LEARN

  • discover the key concepts covered in this course
    recognize methods for propagating errors in code
    recall how exceptions can be thrown and handled
    throw and handle exceptions
    define multiple catch blocks to handle exceptions
    handle exceptions using the try-catch block
    throw exceptions using exception classes
  • create and use custom exception classes
    use custom exceptions and catch blocks
    recall why exceptions must be caught by reference
    violate the noexcept keyword
    cascade errors up the stack trace
    use the function-try-block to clean up resources
    summarize the key concepts covered in this course

IN THIS COURSE

  • Playable
    1. 
    Course Overview
    1m 56s
    UP NEXT
  • Playable
    2. 
    Techniques for Propagating Errors
    6m 46s
  • Locked
    3. 
    How Exceptions Are Thrown and Handled
    9m 12s
  • Locked
    4. 
    Throwing and Handling Exceptions
    8m 51s
  • Locked
    5. 
    Defining Multiple Catch Blocks
    6m
  • Locked
    6. 
    Handling Exceptions Using the try-catch Block
    8m 33s
  • Locked
    7. 
    Throwing Exceptions Using Exception Classes
    10m 21s
  • Locked
    8. 
    Creating and Using Custom Exception Classes
    8m 21s
  • Locked
    9. 
    Using Custom Exceptions and Catch Blocks
    10m 44s
  • Locked
    10. 
    Catching Exceptions by Reference
    9m 53s
  • Locked
    11. 
    Violating the noexcept Keyword
    9m 48s
  • Locked
    12. 
    Cascading Errors up the Stack Trace
    5m 44s
  • Locked
    13. 
    Using the Function-try-block
    7m 13s
  • Locked
    14. 
    Course Summary
    4m 30s

EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE

Skillsoft is providing you the opportunity to earn a digital badge upon successful completion of this course, which can be shared on any social network or business platform

Digital badges are yours to keep, forever.