Abstract
Exception specifications can aid in the tasks of writing correct exception handlers and understanding exceptional control flow, but current exception specification systems are impractical in a number of ways. In particular, they are too low-level, too heavyweight, and do not provide adequate support for describing exception policies.
We have identified the essential properties of a practical exception specification system and we present a methodology and tool that provides integrated support for specifying understanding, and evolving exception policies. The annotations required of the programmer are lightweight and easier to maintain than those of current systems; in our studies we observed a 50% to 93% reduction in annotations. By leveraging these annotations, our system provides scalable support for understanding exception flow and for modifying exception annotations.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Barnett, M., Leino, K.R.M., Schulte, W.: The Spec# programming system. In: Huisman, M. (ed.) Cassis International Workshop (2004)
Bloch, J.: Effective Java. Addison-Wesley Professional, Reading (2001)
Dony, C.: A fully object-oriented exception handling system: rationale and Smalltalk implementation. In: Advances in exception handling techniques, pp. 18–38. Springer, New York (2001)
Eckel, B.: Thinking in Java, 3rd edn. Prentice-Hall PTR, Englewood Cliffs (2002)
Flanagan, C., Leino, K., Lillibridge, M., Nelson, C., Saxe, J., Stata, R.: Extended static checking for Java. In: Proceedings of PLDI 2002 (2002)
Fu, C., Milanova, A., Ryder, B., Wonnacott, D.: Robustness testing of Java server applications. In: IEEE Transactions on Software Engineering, pp. 292–312 (April 2005)
Garcia, A.F., Rubira, C.M.F., Romanovsky, A.B., Xu, J.: A comparative study of exception handling mechanisms for building dependable object-oriented software. Journal of Systems and Software 59(2), 197–222 (2001)
Gosling, J., Joy, B., Steele, G., Bracha, G.: Java(TM) Language Specification, 3rd edn. Java Series. Addison-Wesley Professional, Reading (2005)
Grothoff, C., Palsberg, J., Vitek, J.: Encapsulating objects with confined types. In: Proceedings of the 16th ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 2001), pp. 241–255. ACM Press, New York (2001)
Horton, A.: Why doesn’t C# have exception specifications? Available at: http://msdn.microsoft.com/vcsharp/team/language/ask/exceptionspecs
Jo, J., Byeong-Mo, C., Yi, K., Kwang-Moo, C.: An uncaught exception analysis for Java. Journal of Systems and Software (2004)
Kiczales, G., Hilsdale, E., Hugunin, J., Kersten, M., Palm, J., Griswold, W.G.: An overview of AspectJ. In: Knudsen, J.L. (ed.) ECOOP 2001. LNCS, vol. 2072, pp. 327–353. Springer, Heidelberg (2001)
Kiniry, J.R.: Exceptions in Java and Eiffel: Two extremes in exception design and application. In: Cardelli, L. (ed.) ECOOP 2003. LNCS, vol. 2743. Springer, Heidelberg (2003)
Knudsen, J.L.: Fault tolerance and exception handling in BETA. In: Advances in exception handling techniques, pp. 1–17. Springer, New York (2001)
Leino, K.R.M., Schulte, W.: Exception safety for C#. In: SEFM, pp. 218–227. IEEE Computer Society, Los Alamitos (2004)
Lippert, M., Lopes, C.V.: A study on exception detecton and handling using aspect-oriented programming. In: Proceedings of the 22nd International Conference on Software Engineering (ICSE 2000), pp. 418–427. ACM Press, New York (2000)
Litke, J.D.: A systematic approach for implementing fault tolerant software designs in Ada. In: Proceedings of the conference on TRI-ADA 1990, pp. 403–408. ACM Press, New York (1990)
Miller, R., Tripathi, A.R.: 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)
Reimer, D., Srinivasan, H.: Analyzing exception usage in large Java applications. In: Cardelli, L. (ed.) ECOOP 2003. LNCS, vol. 2743. Springer, Heidelberg (2003)
Robillard, M.P.: Personal communication (May 2005)
Robillard, M.P., Murphy, G.C.: Designing robust Java programs with exceptions. In: FSE 2000, pp. 2–10. ACM Press, New York (2000)
Robillard, M.P., Murphy, G.C.: Static analysis to support the evolution of exception structure in object-oriented systems. ACM Trans. Softw. Eng. Methodol. 12(2), 191–221 (2003)
Sinha, S., Orso, A., Harrold, M.J.: Automated support for development, maintenance, and testing in the presence of implicit control flow. In: Proceedings of the 26th International Conference on Software Engineering (ICSE 2004), pp. 336–345. IEEE Computer Society, Los Alamitos (2004)
Venners, B.: Interface Design: Best Practices in Object-Oriented API Design in Java (2001), Available at: http://www.artima.com/interfacedesign
Venners, B.: Failure and exceptions: a conversation with James Gosling, Part II (September 2003), Available at: http://www.artima.com/intv/solid.html
Venners, B., Eckel, B.: The trouble with checked exceptions: A conversation with Anders Hejlsberg, Part II (August 2003), Available at: http://www.artima.com/intv/handcuffs.html
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2006 Springer-Verlag Berlin Heidelberg
About this chapter
Cite this chapter
Malayeri, D., Aldrich, J. (2006). Practical Exception Specifications. In: Dony, C., Knudsen, J.L., Romanovsky, A., Tripathi, A. (eds) Advanced Topics in Exception Handling Techniques. Lecture Notes in Computer Science, vol 4119. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11818502_11
Download citation
DOI: https://doi.org/10.1007/11818502_11
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-37443-5
Online ISBN: 978-3-540-37445-9
eBook Packages: Computer ScienceComputer Science (R0)