Difference between revisions of "Exception"

From Computer History Wiki
Jump to: navigation, search
(An OK start)
 
(Note raise/signal jargon)
Line 3: Line 3:
 
When such an event happens, program execution is diverted to an [[condition handler]] for that specific condition, which is expected to deal with that condition.
 
When such an event happens, program execution is diverted to an [[condition handler]] for that specific condition, which is expected to deal with that condition.
  
The term 'exception' is often used for hardware-detected issues (e.g. in the [[Motorola 68000 Family]]); the term 'condition' is usually more general, and covers software-detected and generated issues.
+
The term 'exception' is often used for hardware-detected issues (e.g. in the [[Motorola 68000 Family]]); the term 'condition' is usually more general, and covers software-detected and generated issues. Software is said to '''raise''' or '''signal''' a condition.
  
 
{{stub}}
 
{{stub}}

Revision as of 16:45, 21 October 2017

An exception (more often condition) refers to facilities in some programming languages and operating systems to indicate the occurrence of some sort of error or un-expected event - e.g. 'divide by zero' or 'unexpected end-of-file'.

When such an event happens, program execution is diverted to an condition handler for that specific condition, which is expected to deal with that condition.

The term 'exception' is often used for hardware-detected issues (e.g. in the Motorola 68000 Family); the term 'condition' is usually more general, and covers software-detected and generated issues. Software is said to raise or signal a condition.