An exception is a state a program enters when it encounteres an erroneous situation. Two examples are number overflow and invalid operands. When an exception occurs, the processor stops executing the program and notifies the user either directly or indirectly that it cannot continue. In other words, if an exception occurs, the program failed. It failed in a way that means there the programmer made a misstake when writing the program. Exceptions do not occur in correctly written programs.
For more information on Exception relaxation, see Exception Relaxation.
Occurs when the result is outside the bounds of the number type.
Occurs when an argument to an operation does not make sense for that operation.
Occurs when a variable of array type is accessed outside the array bounds.
Occurs when an a variable has not been assigned a value.
Occurs when an allocation could not complete.
Occurs when a deallocation could not complete.
We would be more than happy to help you. Our opening hours are 9–15 (CET).
📞 (+47) 93 68 22 77
Nils Bays vei 50, 0876 Oslo, Norway