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.
Preview
Unable to display preview. Download preview PDF.
References
Arnold K., Gosling J.: The Java Programming Language. Addison Wesley 1996.
Attardi G. et al.: Metalevel Programming in CLOS. Proc. European Conference on Object-Oriented Programming (ECOOP'89). Cambridge University Press, 1989.
Ellis M.A., Stroustrup B.: The Annotated C++ Reference Manual. Addison-Wesley 1990.
Goodenough J. B.: Exception Handling: Issues and a Proposed Notation. Communications of the ACM, vol.18, no.12, December 1975.
Goldberg A., Robson D.: Smalltalk-80, the Language and its Implementation. Addison Wesley 1983.
McCarthy J.: Recursive Functions of Symbolic Expressions and their Computation by a Machine. Comm. of the ACM, vol.3, no.4, 1960.
König A., Stroustrup B.: Exception Handling for C++ (revised), Proc. USENIX C++ Conference, 149–176, (1990)
Meyer B.: Eiffel — The Language. Prentice Hall 1992.
Miller W. M.: Exception Handling without Language Extensions. Proc. USENIX C++ Conference. Denver CO., October 1988.
Lehrmann-Madsen O., Moller-Pedersen B., Nygaard K.: Object-Oriented Programming in the BETA Programming Language. Addison-Wesley 1993.
Nelson G. (ed.): Systems Programming with Modula-3. Addison-Wesley 1991.
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.
Stroustrup B.: The C++Programming Language. Addison Wesley 1986.
Stroustrup B.: The Design and Evolution of C++. Addison Wesley 1994.
Templ J.: Metaprogramming in Oberon. Dissertation, ETH Zurich, 1994.
Wirth N., Gutknecht J.: Project Oberon-TheDesign of an Operating System and Compiler. Addison-Wesley 1992.
Author information
Authors and Affiliations
Editor information
Rights 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