Microsoft Store
 

Exception handling


 

Exception handling is a programming language construct or computer hardware mechanism designed to handle runtime errors or other problems (exceptions) which occur during the execution of a computer program.

Related Topics:
Programming language - Computer hardware - Runtime error - Computer program

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

In general, current state will be saved in a predefined location and execution will switch to a predefined handler. Depending on the situation, the handler may later resume the execution at the original location, using the saved information to restore the original state. An exception which will be usually resumed is a page fault, while a division by zero usually cannot be resolved transparently.

Related Topics:
Handler - Page fault - Division by zero

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

From the processing point of view, hardware interrupts are similar to resumable exceptions, except they are usually not related to the current program flow.

~ ~ ~ ~ ~ ~ ~ ~ ~ ~