Abstract
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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Gunnerson, E.: C# and exception specifications. Microsoft (2000), Available online at: http://discuss.develop.com/archives/wa.exe?A2=ind0011A&L=DOTNET&P=R32820
Goodenough, J.B.: Exception handling: issues and a proposed notation. Communications of the ACM 18(12) (December 1975)
Cristian, F.: Exception Handling and Software Fault Tolerance. In: Proceedings of FTCS-25 (reprinted from FTCS-IO 1980, 97–103) 3, IEEE (1996)
Garcia, A., Rubira, C., Romanovsky, A., Xu, J.: A Comparative Study of Exception Handling Mechanisms for Building Dependable Object-Oriented Software. Journal of Systems and Software 2, 197–222 (2001)
Sinha, S., Harrold, M.: Analysis and Testing of Programs with Exception-Handling Constructs. IEEE Transactions on Software Engineering 26, 9 (September 2000)
Miller, R., Tripathi, A.: Issues with exception handling in object-oriented systems. In: Aksit, M., Matsuoka, S. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 85–103. Springer, Heidelberg (1997)
Robillard, M.P., Murphy, G.C.: Designing robust JAVA programs with exceptions. In: Proceedings of the 8th ACM SIGSOFT International Symposium on Foundations of Software Engineering. 25, 6, (November 2000). ACM Press (2000)
Lippert, M., Lopes, C.: A Study on Exception Detection and Handling Using Aspect-Oriented Programming. In: Proceedings of the 22nd International Conference on Software Engineering, Ireland, ACM Press, New York, NY, USA (2000)
Filho, F., Rubira, C., Garcia, A.: A Quantitative Study on the Aspectization of Exception Handling. In: Black, A.P. (ed.) ECOOP 2005. LNCS, vol. 3586, Springer, Heidelberg (2005)
Elrad, T., Filman, R.E., Bader, A.: Aspect-Oriented Programming. Communications of the ACM 44(10), 29–32 (2001)
Parr, T.: ANTLR – Another Tool for Language Recognition. University of San Francisco (2006), Available online at: http://www.antlr.org/
Javacc -Java Compiler Compiler. Available online at: https://javacc.dev.java.net/
Cabral, B., Marques, P., Silva, L.: RAIL: Code Instrumentation for.NET. In: SAC 2005, ACM Press, New York (2005)
Chiba, S.: Load-Time Structural Reflection in Java. In: Bertino, E. (ed.) ECOOP 2000. LNCS, vol. 1850, Springer, Heidelberg (2000)
Gosling, J., Joy, B., Steele, G., Bracha, G.: The JAVA Language Specification. Sun Microsystems, Inc., Mountain View, California, USA (2000), ISBN 0-201-31008-21
ECMA International. Standard ECMA-335 Common Language Infrastructure(CLI). ECMA Standard (2003), Available online at: http://www.ecma-international.org/publications/standards/ecma-335.htm
Goldberg, A., Robson, D.: Smalltalk-80: the language and its implementation. Addison-Wesley Longman Publishing Co., Inc, Boston, MA (1983)
Meyer, B.: Eiffel: the Language. Prentice-Hall, Inc, Upper Saddle River, NJ, USA (1992)
Cabral, B., Marques, P.: Making Exception Handling Work. In: Proceedings of the Workshop on Hot Topics in System Dependability (HotDep’06), USENIX, Seattle, USA (November 2006)
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 2007 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Cabral, B., Marques, P. (2007). Exception Handling: A Field Study in Java and .NET. In: Ernst, E. (eds) ECOOP 2007 – Object-Oriented Programming. ECOOP 2007. Lecture Notes in Computer Science, vol 4609. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-73589-2_8
Download citation
DOI: https://doi.org/10.1007/978-3-540-73589-2_8
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-73588-5
Online ISBN: 978-3-540-73589-2
eBook Packages: Computer ScienceComputer Science (R0)