Exception handling: Difference between revisions

Content deleted Content added
empty section
Digital27 (talk | contribs)
m Fixed typo
Line 4:
In [[computing]] and [[computer programming]], '''exception handling''' is the process of responding to the occurrence of ''exceptions'' – anomalous or exceptional conditions requiring special processing – during the [[Execution (computing)|execution]] of a [[Computer program|program]]. In general, an exception breaks the normal flow of execution and executes a pre-registered ''exception handler''; the details of how this is done depend on whether it is a [[Computer hardware|hardware]] or [[software]] exception and how the software exception is implemented.
 
Exceptions are defined by different layers of a computer system, and the typical layers are CPU-defined [[interrupt]]s, [[operating system]] (OS)-defined [[Signal (IPC)|signals]], [[programming language]]-defined exceptions. Each layer requires different ways of exception handling although they mamay be interrelated, e.g. a CPU interrupt could be turned into an OS signal. Some exceptions, especially hardware ones, may be handled so gracefully that execution can resume where it was interrupted.
 
== Definition ==