error trapping

John Cowan cowan at
Tue Oct 19 18:56:31 BST 1999

james anderson scripsit:

> one intrinsic problem with java parsers is that the java control model forces
> exceptions to unwind from the initiator's dynamic  context before the handler
> obtains control.

It is no accident that C++ and Java have termination semantics only
for their exceptions.  Unfortunately I cannot find a citation to this
story, but it is instructive.

Mesa, a dialect of Pascal with modules, exceptions, and many other things,
was the language of a group at Xerox PARC.  Its exceptions were
defined with resumption semantics.  Over the course of many years of
large-scale development, including the Xerox Star and ViewPoint
document workstations, it was found that wherever resumption was
actually employed, it was invariably buggy.  One by one, resumptive
exception handlers were tracked down and removed, until in the end
nothing was left but termination.

The essential problem with resumption, IMHO, is that it breaks
encapsulation: the resumptive handler is written by the author of the
calling routine, but runs as a friend of the called routine.
To work correctly, then, the caller must know everything about the

John Cowan                                   cowan at
       I am a member of a civilization. --David Brin

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at
Archived as: and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo at the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo at the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at

More information about the Xml-dev mailing list