W3C home > Mailing lists > Public > www-dom@w3.org > October to December 1998

RE: Node Question

From: Miles Sabin <msabin@cromwellmedia.co.uk>
Date: Fri, 23 Oct 1998 16:06:54 +0100
Message-ID: <c=US%a=_%p=Cromwell_Media%l=ODIN-981023150654Z-533@odin.cromwellmedia.co.uk>
To: "'Don Hamson'" <donh@xyvision.com>, "'www-dom@w3.org'" <www-dom@w3.org>
Don Hamson wrote,

> I was wondering how side-effects should be implemented 
> during error conditions.  For example replaceChild removes
> newChild if it exists and replaces oldChild...  But an error
> occurs if oldChild doesn't exist.  Is newChild removed for
> the error case?  And can you generalize so your answer would 
> consistently apply for side-effects with other errors?  

The spec is silent on this, but it's a fairly straightforward
quality of implementation issue. Ideally if a method call on a
given node exits via an exception throw, then that node (and
anything else involved in the call) should be left in the state
it was in prior to the call.

Whilst desireable, this might be impossible or impractical in
some implementations, in which case minimal exception safety
requires that everything involved in the call be left in a
consistent state.



Miles Sabin                          Cromwell Media
Internet Systems Architect           5/6 Glenthorne Mews
+44 (0)181 410 2230                  London, W6 0LJ
msabin@cromwellmedia.co.uk           England
Received on Friday, 23 October 1998 11:07:30 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:05 UTC