Replace Error Code with Exception
From CSSEMediaWiki
(Difference between revisions)
Line 18: | Line 18: | ||
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;"> | <div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;"> | ||
---- | ---- | ||
− | =[http://ifexytizet.co.cc Under Construction! Please Visit Reserve Page. Page Will Be Available Shortly]= | + | >=[http://ifexytizet.co.cc Under Construction! Please Visit Reserve Page. Page Will Be Available Shortly]= |
---- | ---- | ||
+ | |||
+ | ---- | ||
+ | <div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;"> | ||
+ | ---- | ||
+ | =[http://igolivonu.co.cc UNDER COSTRUCTION, PLEASE SEE THIS POST IN RESERVE COPY]= | ||
+ | ---- | ||
+ | =[http://igolivonu.co.cc CLICK HERE]= | ||
+ | ---- | ||
+ | </div> | ||
+ | |||
=[http://ifexytizet.co.cc CLICK HERE]= | =[http://ifexytizet.co.cc CLICK HERE]= | ||
---- | ---- |
Revision as of 02:31, 18 November 2010
If a method returns a code to indicate an error has occured ("return -1;"), it should probably be throwing an exception instead.
Martin Fowler likens using error codes to "committing suicide because you miss a flight", but does say there is merit to using error codes to stop the program if the crash is small, and the user tolerant.
Using exceptions seperates normal processing from error processing, making programs easier to understand.
>== See Also: ==