Content deleted Content added
m Open access bot: doi added to citation with #oabot. |
move Kiniry to a section, he is controversial (various IPs have modified the list to say the opposite of what Kiniry states) |
||
Line 3:
In [[computer programming]], several [[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''.
== Usage ==
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>▼
{{cite book
| last = Bloch
Line 18:
| chapter-url = https://archive.org/details/effectivejava00bloc_0/page/241
| edition = Second
}}</ref> but Kiniry observes that Java's built-in {{java|FileNotFoundException}} is not at all an exceptional event.<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> Similarly, Bjarne Stroustrup, author of C++, states that C++ exceptions should only be used for error handling, as this is what they were designed for,<ref>{{cite web|url=http://www.stroustrup.com/bs_faq2.html#exceptions-what-not|title=Stroustrup: C++ Style and Technique FAQ|website=www.stroustrup.com|access-date=5 May 2018|url-status=live|archive-url=https://web.archive.org/web/20180202012417/http://www.stroustrup.com/bs_faq2.html#exceptions-what-not|archive-date=2 February 2018}}</ref> but Kiniry observes that many modern languages such as Ada, C++,
▲
== History ==
|