Skip to main content

Zero-overhead exception handling using metaprogramming

  • Contributed Papers
  • Conference paper
  • First Online:
SOFSEM'97: Theory and Practice of Informatics (SOFSEM 1997)

Abstract

We present a novel approach to exception handling which is based on metaprogramming. Our mechanism does not require language support, imposes no run time overhead to error-free programs, and is easy to implement. Exception handlers are implemented as ordinary procedures. When an exception occurs, the corresponding handler is searched dynamically using the type of the exception as a search criterion. Our implementation was done in the Oberon System but it could be ported to most other systems that support metaprogramming.

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

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Arnold K., Gosling J.: The Java Programming Language. Addison Wesley 1996.

    Google Scholar 

  2. Attardi G. et al.: Metalevel Programming in CLOS. Proc. European Conference on Object-Oriented Programming (ECOOP'89). Cambridge University Press, 1989.

    Google Scholar 

  3. Ellis M.A., Stroustrup B.: The Annotated C++ Reference Manual. Addison-Wesley 1990.

    Google Scholar 

  4. Goodenough J. B.: Exception Handling: Issues and a Proposed Notation. Communications of the ACM, vol.18, no.12, December 1975.

    Google Scholar 

  5. Goldberg A., Robson D.: Smalltalk-80, the Language and its Implementation. Addison Wesley 1983.

    Google Scholar 

  6. McCarthy J.: Recursive Functions of Symbolic Expressions and their Computation by a Machine. Comm. of the ACM, vol.3, no.4, 1960.

    Google Scholar 

  7. König A., Stroustrup B.: Exception Handling for C++ (revised), Proc. USENIX C++ Conference, 149–176, (1990)

    Google Scholar 

  8. Meyer B.: Eiffel — The Language. Prentice Hall 1992.

    Google Scholar 

  9. Miller W. M.: Exception Handling without Language Extensions. Proc. USENIX C++ Conference. Denver CO., October 1988.

    Google Scholar 

  10. Lehrmann-Madsen O., Moller-Pedersen B., Nygaard K.: Object-Oriented Programming in the BETA Programming Language. Addison-Wesley 1993.

    Google Scholar 

  11. Nelson G. (ed.): Systems Programming with Modula-3. Addison-Wesley 1991.

    Google Scholar 

  12. Steindl C., Mössenböck H.: Metaprogramming Facilities in Oberon for Windows and Power Macintosh. Technical Report 4, Institute of Computer Science, University of Linz, 1996.

    Google Scholar 

  13. Stroustrup B.: The C++Programming Language. Addison Wesley 1986.

    Google Scholar 

  14. Stroustrup B.: The Design and Evolution of C++. Addison Wesley 1994.

    Google Scholar 

  15. Templ J.: Metaprogramming in Oberon. Dissertation, ETH Zurich, 1994.

    Google Scholar 

  16. Wirth N., Gutknecht J.: Project Oberon-TheDesign of an Operating System and Compiler. Addison-Wesley 1992.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

František Plášil Keith G. Jeffery

Rights and permissions

Reprints and permissions

Copyright information

© 1997 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Hof, M., Mössenböck, H., Pirkelbauer, P. (1997). Zero-overhead exception handling using metaprogramming. In: Plášil, F., Jeffery, K.G. (eds) SOFSEM'97: Theory and Practice of Informatics. SOFSEM 1997. Lecture Notes in Computer Science, vol 1338. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-63774-5_122

Download citation

  • DOI: https://doi.org/10.1007/3-540-63774-5_122

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-63774-5

  • Online ISBN: 978-3-540-69645-2

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics