An event occurring during execution of a program that makes continuation impossible or undesirable. Examples include division by zero, arithmetic overflow, array reference with index out of bounds, fault condition on a peripheral, and external interrupt. Some programming languages respond to an exception by aborting execution, but others (e.g. Ada, C++) allow the programmer to provide a piece of code—called an exception handler—that is automatically invoked when the exception occurs. This can take appropriate remedial action, then either resume execution of the program (at the point where the exception occurred or elsewhere) or terminate the program in a controlled manner.