C++: Difference between revisions

Content deleted Content added
Undid revision 900331947 by WikiaWeeb (talk): Language: There's a lengthy comment in the wikitext probably not visible in the mobile app: BEFORE MAKING CHANGES to the "Hello World" example please establish consensus by discussing your proposed changes on the Talk page. This is not the place to "Be Bold"; this has been discussed before at length.
Line 354:
 
It is also possible to raise exceptions purposefully, using the <syntaxhighlight lang="C++" inline>throw</syntaxhighlight> keyword; these exceptions are handled in the usual way. In some cases, exceptions cannot be used due to technical reasons. One such example is a critical component of an embedded system, where every operation must be guaranteed to complete within a specified amount of time. This cannot be determined with exceptions as no tools exist to determine the maximum time required for an exception to be handled.<ref>{{Cite book|title = The C++ Programming Language|last = Stroustrup|first = Bjarne|publisher = Addison Wesley|year = 2013|isbn = 9780321563842|___location = |pages = 349}}</ref>
 
Unlike signal-handling, exception-handling does not mean calling a handler-function from the point of failure but rather the opposite: The current scope will be left (including potentially any number of called function) and the catch-block will be entered. The catch-block might be located in the current function or any number of function calls down the stack.
 
== Standard library ==