1.1. What Is an Exception?
To signal that an error has occurred during program execution, the .NET CLR (Common Language Runtime) uses exceptions, which are objects that are thrown (instantiated and passed up the call stack) in response to runtime errors. A runtime error is one that changes or interrupts the normal flow of execution in a program.
NOTE
You will often see the terms exception and error used interchangeably, although technically they are not the same thing. An error is simply any situation in which unwanted or unexpected results occur, while an exception is a specific object instantiated in response to a runtime error. However, as long as it's understood that you're talking about runtime errors, swapping these terms is usually not ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access