Content deleted Content added
m Reverted edits by 86.45.80.233 (talk) to last version by 66.41.96.235 |
Error codes and exception handling Tag: nowiki added |
||
Line 3:
==Error codes and exception handling==
Error codes are slowly disappearing from the programmer's environment as modern <nowiki><nowiki>Insert non-formatted text here</nowiki><nowiki><nowiki>Insert non-formatted text here</nowiki><nowiki><nowiki>Insert non-formatted text here</nowiki>
Error codes are slowly disappearing from the programmer's environment as modern [[Object-oriented programming|object-oriented]] [[programming languages]] replace them with [[Exception handling|exceptions]]. Exceptions have the advantage of being handled with explicit blocks of code, separate from the rest of the code. While it is considered poor practice in methodologies that use error codes and return codes to indicate failure, programmers often neglect to check return values for error conditions. That negligence can cause undesirable effects, as ignored error conditions often cause more severe problems later in the program. Exceptions are implemented in such a way as to separate the error handling code from the rest of the code. Separating the error handling code from the normal logic makes programs easier to write and understand, since one block of error handling code can service errors from any number of function calls. Exception handling also makes the code more readable than implementations with error codes, since exception handling does not disrupt the flow of the code with frequent checks for error conditions.▼
*
=== Bulleted list item ===
{| class="wikitable"
|-
! Header text !! Header text !! Header text
|-
| Example || Example || Example
|-
| Example || Example || Example
|-
| Example || Example || Example
|}
<gallery>
Example.jpg|Caption1
Example.jpg|Caption2
</gallery>
▲
==See also==
|