Skip to main content

Exception Handling: A Field Study in Java and .NET

  • Conference paper
ECOOP 2007 – Object-Oriented Programming (ECOOP 2007)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 4609))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Gunnerson, E.: C# and exception specifications. Microsoft (2000), Available online at: http://discuss.develop.com/archives/wa.exe?A2=ind0011A&L=DOTNET&P=R32820

  2. Goodenough, J.B.: Exception handling: issues and a proposed notation. Communications of the ACM 18(12) (December 1975)

    Google Scholar 

  3. Cristian, F.: Exception Handling and Software Fault Tolerance. In: Proceedings of FTCS-25 (reprinted from FTCS-IO 1980, 97–103) 3, IEEE (1996)

    Google Scholar 

  4. 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)

    Article  Google Scholar 

  5. Sinha, S., Harrold, M.: Analysis and Testing of Programs with Exception-Handling Constructs. IEEE Transactions on Software Engineering 26, 9 (September 2000)

    Google Scholar 

  6. 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)

    Chapter  Google Scholar 

  7. 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)

    Google Scholar 

  8. 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)

    Google Scholar 

  9. 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)

    Google Scholar 

  10. Elrad, T., Filman, R.E., Bader, A.: Aspect-Oriented Programming. Communications of the ACM 44(10), 29–32 (2001)

    Article  Google Scholar 

  11. Parr, T.: ANTLR – Another Tool for Language Recognition. University of San Francisco (2006), Available online at: http://www.antlr.org/

  12. Javacc -Java Compiler Compiler. Available online at: https://javacc.dev.java.net/

  13. Cabral, B., Marques, P., Silva, L.: RAIL: Code Instrumentation for.NET. In: SAC 2005, ACM Press, New York (2005)

    Google Scholar 

  14. Chiba, S.: Load-Time Structural Reflection in Java. In: Bertino, E. (ed.) ECOOP 2000. LNCS, vol. 1850, Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  15. 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

    Google Scholar 

  16. 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

  17. Goldberg, A., Robson, D.: Smalltalk-80: the language and its implementation. Addison-Wesley Longman Publishing Co., Inc, Boston, MA (1983)

    MATH  Google Scholar 

  18. Meyer, B.: Eiffel: the Language. Prentice-Hall, Inc, Upper Saddle River, NJ, USA (1992)

    MATH  Google Scholar 

  19. 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)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Erik Ernst

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics