W3C home > Mailing lists > Public > www-dom-ts@w3.org > August 2001

Re: Multiple potential exceptions: nodereplacechildnewchilddiffdocument

From: Mary Brady <mbrady@nist.gov>
Date: Wed, 22 Aug 2001 13:46:02 -0400
Message-ID: <020401c12b32$4f732570$293b0681@HAPPY>
To: "Curt Arnold" <carnold@houston.rr.com>, <www-dom-ts@w3.org>
The original java code checks for a WRONG_DOCUMENT_ERR, so I am sure 
that this was probably a cut-and-paste error -- I suspect that the test that was 
originally immediately before this one probably checks for a NOT_FOUND_ERR.
Please do change it.

--Mary
  ----- Original Message ----- 
  From: Curt Arnold 
  To: www-dom-ts@w3.org 
  Sent: Wednesday, August 22, 2001 1:28 PM
  Subject: Multiple potential exceptions: nodereplacechildnewchilddiffdocument


  nodereplacechildnewchilddiffdocument.xml is a strange case.  

  It calls Node.replaceChild with a old node that is not a child of the target node and attempts to replace it with a node that isn't part of this document.  So it could conceivable throw either NOT_FOUND_ERR or WRONG_DOCUMENT_ERR depending on which condition it tested first.  I don't believe there is anything in the DOM spec that would prescribe which exception code should take precedence and DOMTSML doesn't have a construct to support an ambiguous exception code.

  The test is internally inconsistant since the description says
  The "replaceChild(newChild,oldChild)" method raises a 
  WRONG_DOCUMENT_ERR DOMException if the "newChild" was
  created from a different document than the one that 
  created this node.

  But the test checks for NOT_FOUND_ERR.  I'm going to make the body consistent with the description.
Received on Wednesday, 22 August 2001 13:47:29 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:34:03 UTC