Exceptions
An exception is an abnormal condition that interrupts a program’s normal flow of execution. In many programming languages, exceptions are objects that describe an error or unusual condition and can be raised when something goes wrong, such as a failed file operation or an invalid input. When an exception is raised, the runtime transfers control to an exception handler. If no handler is found, the exception propagates up the call stack and may terminate the program.
Exception handling provides mechanisms to recover from errors and to ensure resources are released. Common constructs
Languages distinguish between different kinds of exceptions. Some use checked exceptions, which must be declared or
Outside computing, the term exception also denotes an instance that does not conform to a general rule,