Changes between Version 50 and Version 51 of ProgrammingGuidelines


Ignore:
Timestamp:
07/14/11 21:33:05 (8 years ago)
Author:
dennisr
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ProgrammingGuidelines

    v50 v51  
     1[[BibAdd(wiki:BibTexElckerlycPublications)]] 
    12!^[[ElckerlycDocumentation]] 
    23[[PageOutline]] 
     
    2526 
    2627== Exception handling guidelines == 
    27  1. Use checked exceptions for exceptions that the client can take useful actions upon. Use !RunTimeException and its subclasses otherwise. 
    28  1. Store information in the exceptions so that the client can use this information in recovering from them (for example: the !AudioUnitPlayException contains the failing !AudioUnit). 
    29  1. A chain of exceptions can be used to translate a low-level exception into a higher level one. When this technique is used, always include the original exception in the higher level exception (using initCause), so that it stack trace can be used in debugging. 
    30  1. Don't ignore exceptions. Either catch them and act upon them or throw them. If an exception can't happen, but has to be caught anyways, throw an !AssertionError. If the occurrence of an exception doesn't influence the progress of the client (for example, a file not properly closing after reading all information from it), at least log it. 
     28 1. Use checked exceptions for exceptions that the client can take useful actions upon. Use !RunTimeException and its subclasses otherwise ([[BibCite(bloch2008)]], item 58, 59). 
     29 1. Store information in the exceptions so that the client can use this information in recovering from them (for example: the !AudioUnitPlayException contains the failing !AudioUnit) ([[BibCite(bloch2008)]], item 63). 
     30 1. A chain of exceptions can be used to translate a low-level exception into a higher level one ([[BibCite(bloch2008)]] item 61). When this technique is used, always include the original exception in the higher level exception (using initCause), so that it stack trace can be used in debugging. 
     31 1. Don't ignore exceptions ([[BibCite(bloch2008)]], item 65). Either catch them and act upon them or throw them. If an exception can't happen, but has to be caught anyways, throw an !AssertionError. If the occurrence of an exception doesn't influence the progress of the client (for example, a file not properly closing after reading all information from it), at least log it. 
    3132 
    3233== Hmi Logging Setup == 
     
    332333}}} 
    333334 
     335=== BiBTeX === 
     336Bibtex references stored on BibTex and BibTexElckerlycPublications 
     337[[BibRef]] 
     338 
     339== User contributions == 
    334340[[ViewTopic()]] 
     341 
    335342!^[[ElckerlycDocumentation]]