Abstract
The emergence of exception handling (EH) mechanisms in modern programming languages made available a different way of communicating errors between procedures. For years, programmers trusted in correct documentation of error codes returned by procedures to correctly handle erroneous situations. Now, they have to focus on the documentation of exceptions for the same effect. But to what extent can exception documentation be trusted? Moreover, is there enough documentation for exceptions? And in what way do these questions relate to the discussion on checked against unchecked exceptions? For a given set of Microsoft .NET applications, code and documentation were thoroughly parsed and compared. This showed that exception documentation tends to be scarce. In particular, it showed that 90% of exceptions are undocumented. Furthermore, programmers were demonstrated to be keener to document exceptions they explicitly throw while typically leaving exceptions resulting from method calls undocumented. This conclusion lead to another question: how do programmers use the EH mechanisms available in modern programming languages? More than 16 different .NET applications were examined in order to provide an answer. The major conclusion of this work is that exceptions are not being correctly used as an error-handling mechanism. These results contribute to the assessment of the effectiveness of the unchecked exceptions approach.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.