Exceptions in C++
Channel:
Subscribers:
2,730
Published on ● Video Link: https://www.youtube.com/watch?v=w1tQ8BKX-30
Exceptions are an alternative way to return from a function. Rather than returning a value, they cause the flow of control to go up each scope until it finds a try/catch block that catches the type of exception it throws, and then transfers control to that control block.
This is commonly used when we *can't* return a value from a function, like when you do vec.at() on something that doesn't exist, because any value returned would be wrong.
Other Videos By Bill Kerney
2022-01-14 | C++ in 2 Hours |
2022-01-12 | Review of Tricky 1st Semester Topics |
2022-01-10 | Welcome to CSCI 41! |
2022-01-10 | Week 16 Day 2 - Final Review |
2021-12-10 | Final Review |
2021-12-10 | Projects and Mods Part II |
2021-12-10 | Projects and Mods Presentation Part I |
2021-12-09 | Beautiful Computer Science |
2021-12-06 | The Replication Crisis; The Scientific Method; Kuhn on the Nature of Scientific Revolutions |
2021-12-03 | ACM Workshop: Modding Grand Theft Auto V |
2021-12-03 | Exceptions in C++ |
2021-12-03 | Binary Numbers |
2021-12-03 | Final Thoughts |
2021-12-02 | Recommended Readings for Further Study, Matrix Multiplication |
2021-12-02 | Unix shell scripting, Statistical Testing |
2021-12-01 | Q&A Session |
2021-12-01 | Computer Security |
2021-12-01 | Deductive, Inductive, and Abductive Reasoning |
2021-12-01 | End of the Year Housekeeping, UE5 overview |
2021-12-01 | Unreal Engine 5, Game Over Screen, Timers |
2021-11-30 | Intro to Stats and Statistical Testing |
Tags:
csci 40
exceptions
c++