Exception Handling: A Field Study in Java and .NET
نویسندگان
چکیده
Most modern programming languages rely on exceptions for dealing with abnormal situations. Although exception handling was a significant improvement over other mechanisms like checking return codes, it is far from perfect. In fact, it can be argued that this mechanism is seriously limited, if not, flawed. This paper aims to contribute to the discussion by providing quantitative measures on how programmers are currently using exception handling. We examined 32 different applications, both for Java and .NET. The major conclusion for this work is that exceptions are not being correctly used as an error recovery mechanism. Exception handlers are not specialized enough for allowing recovery and, typically, programmers just do one of the following actions: logging, user notification and application termination. To our knowledge, this is the most comprehensive study done on exception handling to date, providing a quantitative measure useful for guiding the development of new error handling mechanisms.
منابع مشابه
Introducing Catch Arcs to Java Reference Nets
Modeling plays an important role during design and development of systems and processes. Petri nets allow for well-defined models that can be executed. For the implementation of these systems, however, still normal programming languages are used. In contrast, modeling languages – also if executable, such as Petri net formalisms – are not deemed fit for implementation. Besides the pragmatic powe...
متن کاملAnalysis of the .NET CLR Exception Handling Mechanism
We provide a complete mathematical model for the exception handling mechanism of the Common Language Runtime (CLR), the virtual machine underlying the interpretation of .NET programs. The goal is to use this rigorous model in the corresponding part of the still-to-be-developed soundness proof for the CLR bytecode verifier.
متن کاملAn Exception Handling Mechanism for the Concurrent Invocation Statement
Several concurrent programming languages and systems — e.g., MPI, .NET, and SR — provide mechanisms to facilitate communication between one process and a group of others. One such mechanism is SR’s concurrent invocation statement (co statement). It specifies a group of operation invocations and normally terminates when all of its invocations have completed. To make the co statement more flexibl...
متن کاملImplementing Coordinated Exception Handling for Distributed Object-Oriented Systems with AspectJ
Exception handling is a very popular technique for incorporating fault tolerance into software systems. However, its use for structuring concurrent, distributed systems is hindered by the fact that the exception handling models of many mainstream object-oriented programming languages are sequential. In this paper we present an aspect-based framework for incorporating concurrent exception handli...
متن کاملRegaining Control of Exception Handling
Just as the structure of the normal operations of a system tends to degrade as the system evolves, the structure of exception handling also degrades. In this paper, we draw on our experience building and analyzing the exception structure of Java programs to describe why and how exception structure degrades. Fortunately, we need not let our exception structure languish. We also relate our experi...
متن کامل