Hidden truth behind .NET's exception handling today

被引:3
作者
Cabral, B. [1 ]
Sacramento, P. [1 ]
Marques, P. [1 ]
机构
[1] Univ Coimbra, CISUC, Dept Informat Engn, Polo 2, P-3030290 Coimbra, Portugal
关键词
D O I
10.1049/iet-sen:20070017
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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 modem 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.
引用
收藏
页码:233 / 250
页数:18
相关论文
共 27 条
[1]   THE ROLE OF DOMAIN EXPERIENCE IN SOFTWARE-DESIGN [J].
ADELSON, B ;
SOLOWAY, E .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 1985, 11 (11) :1351-1360
[2]  
Brooks F., 1995, MYTHICAL MAN MONTH
[3]   Advanced exception handling mechanisms [J].
Buhr, PA ;
Mok, WYR .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2000, 26 (09) :820-836
[4]  
CABRAL B, 2006, P WORKSH HOT TOP SYS
[5]  
CABRAL B, 2005, P 2005 ACM S APPL CO
[6]  
CANDEA G, 2003, P 3 IEEE WORKSH INT
[7]  
CHENG YC, 2005, P 12 AS PAC SOFTW EN
[8]  
CRISTIAN F, 1996, P FTCS25, P3
[9]  
DEVALE J, 2002, P INT C DEP SYST NET
[10]  
*ECMA INT, 2003, ECMA335 COMM LANG IN