AESYS S.p.A. [Enzo Arlati] schrieb:
> In my application when the parser found an error and call the error
> handler a SIGSEGV occur.
> Belowe I copy the piece of code which can cause the problem.
> I'm new on using xerces-c so mybe I forget something.
> Can someone help me ?

Hi Enzo,

your code looks rather sane - the only thing I'd mention here is to check 
the return value of domError.getLocation() against NULL, e.g.

>     DOMLocator *pLocation = domError.getLocation();
      if (pLocation != NULL){
>
>     stmp = ae_util::format_string(
> "[DOMPrintErrorHandler::handleError] Location line=%d column=%d
> ooffset=%d",
>                                     pLocation->getLineNumber(),
>                                     pLocation->getColumnNumber(),
>                                     pLocation->getOffset());
>     MYLOG( stmp );
>
>     DOMNode *pDomNode = pLocation->getErrorNode();
>     XMLString::transcode(pDomNode->getNodeName(), buffer, 1023);
>     XMLString::transcode(pLocation->getURI(), buffer2, 1023);
      }
      else{
         MYLOG( "(sorry, no location object)" );
      }

Does this help?
                        Axel

-- 
Humboldt-Universität zu Berlin
Institut für Informatik
Signalverarbeitung und Mustererkennung
Dipl.-Inf. Axel Weiß
Rudower Chaussee 25
12489 Berlin-Adlershof
+49-30-2093-3050
** www.freesp.de **

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to