Nowadays, nearly every mainstram programming language includes an exception handling mechanism. Basically, the variety of these mechanisms can be devided in two groups according to their handling models: Mechanisms which support exception termination and those which support resumption. Even though resumption was still an attractive alternative to termination for the first exception handling mechanisms in the 1980s, it has nearly been displaced completely in contemporary languages by termination. Some reasons for this trend will be reviewed in this work. But in our opinion, they do not justify to reject resumption completely. To the contrary, resumption can simplify some tasks extremely while still being implementable with reasonable effort. To show this, we discuss some basic concepts of how a resumption mechanism should be designed in general and propose new syntactical constructs to support these concepts. Based on these concepts, we describe the implementation of a prototypical precompiler for Java supporting exception handling with resumption. In fact, the mechanism implemented in the precompiler not only extends, but completely subsumes the Java mechanism, for it is capable of both, termination and resumption. KEYWORDS— Flexible Exception Handling, Java, Resumption, Prototypical Implementation, Precompiler.
[1]
Barbara Liskov.
A history of CLU
,
1996
.
[2]
Bjarne Stroustrup,et al.
The C++ Programming Language: Special Edition
,
2000
.
[3]
Bertrand Meyer,et al.
Eiffel: The Language
,
1991
.
[4]
Steven J. Drew,et al.
Implementing Zero Overhead Exception Handling
,
1995
.
[5]
簡聰富,et al.
物件導向軟體之架構(Object-Oriented Software Construction)探討
,
1989
.
[6]
Bertrand Meyer,et al.
Object-oriented software construction (2nd ed.)
,
1997
.
[7]
R. Govindarajan,et al.
Exception Handlers in Functional Programming Languages
,
1993,
IEEE Trans. Software Eng..
[8]
Bjarne Stroustrup,et al.
Exception handling for c++ (revised)
,
1990
.
[9]
Flaviu Cristian,et al.
Exception Handling
,
1989
.
[10]
Ole Lehrmann Madsen,et al.
Object-oriented programming in the BETA programming language
,
1993
.