Re: error trapping
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@i... Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1 To unsubscribe, mailto:majordomo@i... the following message; unsubscribe xml-dev To subscribe to the digests, mailto:majordomo@i... the following message; subscribe xml-dev-digest List coordinator, Henry Rzepa (mailto:rzepa@i...)
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format