You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Sergiy Michka (JIRA)" <xe...@xml.apache.org> on 2005/04/06 21:05:38 UTC

[jira] Created: (XERCESC-1401) Not documented xerces-c exception: DOMNode::appendChild

Not documented xerces-c exception: DOMNode::appendChild
-------------------------------------------------------

         Key: XERCESC-1401
         URL: http://issues.apache.org/jira/browse/XERCESC-1401
     Project: Xerces-C++
        Type: Bug
  Components: Documentation  
    Versions: 2.6.0    
 Environment: Win NT, MSVC 6.0
    Reporter: Sergiy Michka


I found that, DOMNode::appendChild throws unspecified xerces exception.
The documented one (http://xml.apache.org/xerces-c/apiDocs/classDOMNode.html#z113_15) is only DOMException.

My code looks like this:

try
{
// ...

DOMElement* child1 = pDoc->createElement(("child1"));
rootElem->appendChild(child1);
DOMText* child1_val = pDoc->createTextNode(("child1_val")));
DOMText* child1_val2 = 0;
child1_val2 = reinterpret_cast<DOMText*> (child1->appendChild(child1_val));
// undocumented xerces exception
}
catch (DOMException& rExc)
{
throw MyException(rExc.getMessage());
}
catch (...) // not documented: what kind of Exception will be thrown?
{
 throw MyException(_T("Can not append TextNode"));
}

So whats wrong?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


[jira] Commented: (XERCESC-1401) Not documented xerces-c exception: DOMNode::appendChild

Posted by "David Bertoni (JIRA)" <xe...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XERCESC-1401?page=comments#action_62303 ]
     
David Bertoni commented on XERCESC-1401:
----------------------------------------

Please provide a complete, minimal sample we can use to reproduce the problem.  I started with your code snippet and added enough to get the code to compile and run, but I could not reproduce the problem.

> Not documented xerces-c exception: DOMNode::appendChild
> -------------------------------------------------------
>
>          Key: XERCESC-1401
>          URL: http://issues.apache.org/jira/browse/XERCESC-1401
>      Project: Xerces-C++
>         Type: Bug
>   Components: Documentation
>     Versions: 2.6.0
>  Environment: Win NT, MSVC 6.0
>     Reporter: Sergiy Michka

>
> I found that, DOMNode::appendChild throws unspecified xerces exception.
> The documented one (http://xml.apache.org/xerces-c/apiDocs/classDOMNode.html#z113_15) is only DOMException.
> My code looks like this:
> try
> {
> // ...
> DOMElement* child1 = pDoc->createElement(("child1"));
> rootElem->appendChild(child1);
> DOMText* child1_val = pDoc->createTextNode(("child1_val")));
> DOMText* child1_val2 = 0;
> child1_val2 = reinterpret_cast<DOMText*> (child1->appendChild(child1_val));
> // undocumented xerces exception
> }
> catch (DOMException& rExc)
> {
> throw MyException(rExc.getMessage());
> }
> catch (...) // not documented: what kind of Exception will be thrown?
> {
>  throw MyException(_T("Can not append TextNode"));
> }
> So whats wrong?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org