Exception handling (programming): Difference between revisions

Content deleted Content added
No edit summary
Line 1:
{{broader|Exception handling}}
 
In [[computer programming]], severlseveral [[programming language|language]] mechanisms exist for '''exception handling'''. The term ''exception'' is typically used to denote a data structure storing information about an exceptional condition. One mechanism to transfer control, or ''raise'' an exception, is known as a ''throw''; the exception is said to be ''thrown''. Execution is transferred to a ''catch''.
 
Programming languages differ substantially in their notion of what an exception is. Contemporary languages can roughly be divided into two groups:<ref name="Kiniry">{{Cite book | doi = 10.1007/11818502_16| chapter = Exceptions in Java and Eiffel: Two Extremes in Exception Design and Application| title = Advanced Topics in Exception Handling Techniques| volume = 4119| pages = 288–300| series = Lecture Notes in Computer Science| year = 2006| last1 = Kiniry | first1 = J. R. | isbn = 978-3-540-37443-5|url=http://staffwww.dcs.shef.ac.uk/people/A.Simons/remodel/papers/ExceptionsInEiffelAndJava.pdf}}</ref><ref group=note>PL/I used dynamically scoped exceptions. PL/I exception handling included events that are not errors, e.g., attention, end-of-file, modification of listed variables.{{Citation needed|date=June 2020}}</ref>