error trapping

Matthew Gertner matthew at praxis.cz
Wed Oct 20 14:07:47 BST 1999


Of course it is possible to implement resume semantics in C++ or Java
using exception handlers, although this places a significant burden on
the developer. Termination is only the default behavior. If I am not
mistaken, good old SP has excellent facilities for reporting validity
errors while continuing to validate, although I don't know whether it
uses standard C++ exceptions or some proprietary approach. In any case,
this seems very much desirable for certain types of XML applications,
such as authoring tools.

Matthew

james anderson wrote:
> 
> interesting account re MESA.
> 
> well, resumption does require that the module which raises the exception
> provide meaningfull and correctly operating provisions for
> restarts/continuations, and that it provide exceptions which carry information
> adequate to decide upon and undertake appropriate corrective action. the
> necessary interfaces are on the same level as the principal functional
> interface and, as such, would not appear to do anything to compromise encapsulation.
> 
> they may be harder to correctly program than simply exiting, but that's
> another story.
> as mr. bray notes, they may not be desirable, but that's also another story.
> 
> John Cowan wrote:
> >
> > 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.
> >
> >...
> >
> > 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
> > callee.
> 
> not necessarily: yes, the caller must understand the causes and consequences
> of the conditions raised, but they must also know and abide by the interface
> provided by the exceptions and are constrained to the defined
> restarts/continuations, both of which are specified by the callee. while this
> form of encapsulation may have more facets, where's it broken?

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





More information about the Xml-dev mailing list