Exception: Difference between revisions

From Computer History Wiki
Jump to navigationJump to search
An OK start
 
m raise hardware czse up
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
An '''exception''' (more often '''condition''') refers to facilities in some [[programming language]]s and [[operating system]]s to indicate the occurrence of some sort of error or un-expected event - e.g. 'divide by zero' or 'unexpected end-of-file'.
An '''exception''' (more often '''condition''') refers to facilities in some [[programming language]]s and [[operating system]]s to indicate the occurrence of some sort of error or un-expected event - e.g. 'divide by zero' or 'unexpected end-of-file'.
The term 'exception' is also often used for hardware-detected issues (e.g. in the [[Motorola 68000 Family]]), where a [[trap]] is the usual result; the term 'condition' is usually more general, and covers software-detected and generated issues. Software is said to '''raise''' or '''signal''' a 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.
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.
{{semi-stub}}


{{stub}}
[[Category: Software Concepts]]

Latest revision as of 16:44, 1 July 2020

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'.

The term 'exception' is also often used for hardware-detected issues (e.g. in the Motorola 68000 Family), where a trap is the usual result; the term 'condition' is usually more general, and covers software-detected and generated issues. Software is said to raise or signal a 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.