From the course: C# Exception and Error Handling

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

What are exceptions?

What are exceptions?

- [Instructor] Let's begin with a basic definition and understanding of what exceptions are and why they happen. An exception is an error condition that happens during the course of the execution of your program's code. When this happens, the exception makes its way through your application until it is caught and handled by an exception handler. So let's take a look at how this process works. Your application consists of the code that you write in various classes, and it sits on top of the .NET framework along with any third-party libraries that you include in your app. Exceptions have a point of origin and a point at which they are handled. They can originate almost anywhere, in the .NET CLR itself or within a third-party library that you're using or within the .NET framework, or of course, within your own application code. If an exception makes it all the way to your application without being handled, then your app will terminate, and that's not the kind of experience we want our…

Contents