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.
[1]
B. Adelson,et al.
The Role of Domain Expenence in Software Design
,
1985,
IEEE Transactions on Software Engineering.
[2]
John B. Goodenough,et al.
Exception handling: issues and a proposed notation
,
1975,
CACM.
[3]
Peter A. Buhr,et al.
Advanced Exception Handling Mechanisms
,
2000,
IEEE Trans. Software Eng..
[4]
Roy A. Maxion,et al.
Improving software robustness with dependability cases
,
1998,
Digest of Papers. Twenty-Eighth Annual International Symposium on Fault-Tolerant Computing (Cat. No.98CB36224).
[5]
Martin P. Robillard,et al.
Static analysis to support the evolution of exception structure in object-oriented systems
,
2003,
TSEM.
[6]
Cecília M. F. Rubira,et al.
A comparative study of exception handling mechanisms for building dependable object-oriented software
,
2001,
J. Syst. Softw..
[7]
Saurabh Sinha,et al.
Analysis and Testing of Programs with Exception Handling Constructs
,
2000,
IEEE Trans. Software Eng..
[8]
Roy A. Maxion,et al.
Eliminating Exception Handling Errors with Dependability Cases: A Comparative, Empirical Study
,
2000,
IEEE Trans. Software Eng..
[9]
Fred P. Brooks,et al.
The Mythical Man-Month
,
1975,
Reliable Software.