Topic: Handlers in dynamic scope of handlers
Author: objfactory@aol.com (ObjFactory)
Date: 28 Apr 1994 02:25:04 -0400 Raw View
While the ARM is silent on the subject, the discussion seems to assume that
there can be only one outstanding thrown exception at a time. This is need not
be the case, i.e., when a handler executes a try block. This causes some
obvious implementation problems, but I am more concerned with the conceptual
ones, e.g.,
catch(...) {
foo();
bar();
throw();
}
If foo() throws an exception, bar() - presumably essential recovery - will not
be executed. So how does one design foo()? So it can never throw an exception?
Suppose foo() must perform operations that can sometimes throw exceptions, like
operating system surrogates in class libraries? To make a long story short, is
this the style one must adopt?
catch(...) {
try { foo(); } catch(...) {}
bar();
throw();
}
Has anyone a better suggestion?
Bob Foster
Object Factory