You will have to use the debug version of Xerces and debug the Xerces code.
Alberto
At 16.08 02/07/2007 +0530, Pranav, Savkur wrote:
Hello Alberto,
ok from the trace message here, its confusing which exception
handler has caught but we have a facility in the traceviewer of showing
which line of code contributed to this trace. From that, its clear that
the generic exception is being called
When I debug this piece of code the exception gets thrown from
this part where the transcode is called and gets caught in the generic
exception... How do I progress from here
Regards,
Pranav
-----Original Message-----
From: ext Alberto Massari [mailto:[EMAIL PROTECTED]
Sent: Monday, July 02, 2007 3:55 PM
To: Pranav, Savkur
Cc: [email protected]
Subject: RE: FW: XMLString::transcode throws exception
At 15.36 02/07/2007 +0530, Pranav, Savkur wrote:
>Hello Alberto,
>
> the trace has given the following data:
>
> XH_DOMTreeHelper::ReadXMLNode() - >Creating Tempstr
> XH_DOMTreeHelper::ReadXMLNode() - calling transcode Caught an
> exception in XH_DOMTreeHelper::ReadXMLNode()
>
>Instead of getting
>XH_DOMTreeHelper::ReadXMLNode()transcode succeeded after
>XH_DOMTreeHelper::ReadXMLNode() - calling transcode, I get Caught an
>exception in XH_DOMTreeHelper::ReadXMLNode()
>
> From this,its clear that the call to transcode is throwing the
>exception...
But it's not clear which exception handler has caught it; please change
the trace of the two handler to make them different; and, for the fourth
time, use a debugger.... it's for free!
Alberto
>Does this throw more light on the problem
>
>Regards,
>Pranav
>
>-----Original Message-----
>From: ext Alberto Massari [mailto:[EMAIL PROTECTED]
>Sent: Monday, July 02, 2007 3:22 PM
>To: Pranav, Savkur
>Cc: [email protected]
>Subject: RE: FW: XMLString::transcode throws exception
>
>Hi Pranav,
>could you post the output of the TRACE_INFO that your code has? Have
>you tried to use the debugger to find out the code throwing the
exceptions?
>
>Alberto
>
>At 15.08 02/07/2007 +0530, Pranav, Savkur wrote:
> >Hello Alberto,
> > yes I have a catch for XMLException but the exception is not
> >getting caught in this catch block!
> >
> >XERCES_CPP_NAMESPACE::XMLPlatformUtils::Initialize();
> >
> >try
> > {
> > // get a serializer, an instance of DOMWriter
> > TRACE_INFO("Entering XH_DOMTreeHelper::ReadXMLNode()
> >-
>
> >Creating Tempstr");
> > XMLCh tempStr[4000];
> >
> > TRACE_INFO("XH_DOMTreeHelper::ReadXMLNode() -
> >calling transcode");
> > XERCES_CPP_NAMESPACE::XMLString::transcode("LS",
> >tempStr, 3999);
> TRACE_INFO("XH_DOMTreeHelper::ReadXMLNode() -
> >transcode succeeded");
> > }
> >catch (XERCES_CPP_NAMESPACE::XMLException& e)
> > {
> > TRACE_INFO("Caught an exception in
> >XH_DOMTreeHelper::ReadXMLNode()");
> > CString cstrTraceMsg;
> > cstrTraceMsg.Format(_T("ERROR: Internal DOM Error -
> >An
>
> >error occurred during creation of output transcoder. Exception code:
> >%d
>
> >Msg is : %s"), e.getCode(),e.getMessage());
> >
> >TRACE_ERROR(CLString(cstrTraceMsg),ERR_DOM_OPERATION_FAILED);
> >
> > delete pSerializer;
> > pSerializer = 0;
> > XERCES_CPP_NAMESPACE::XMLPlatformUtils::Terminate();
> > sifRetCode = ERR_DOM_OPERATION_FAILED;
> > }
> > catch(...)
> > {
> > TRACE_INFO("Caught an exception in
> >XH_DOMTreeHelper::ReadXMLNode()");
> >
> > delete pSerializer;
> > pSerializer = 0;
> > XERCES_CPP_NAMESPACE::XMLPlatformUtils::Terminate();
> > sifRetCode = ERR_DOM_OPERATION_FAILED;
> > }
> >
> >It always gets caught in the (...) section Pls help
> >
> >Regards,
> >Pranav
> >-----Original Message-----
> >From: ext Alberto Massari [mailto:[EMAIL PROTECTED]
> >Sent: Monday, July 02, 2007 2:30 PM
> >To: Pranav, Savkur
> >Cc: [email protected]
> >Subject: RE: FW: XMLString::transcode throws exception
> >
> >At 14.21 02/07/2007 +0530, Pranav, Savkur wrote:
> > >Hello Alberto,
> > > thanks for the reply.
> > >But this exception is getting caught in the generic catch block
> > >with the
> > >catch(...) How do I get to know the reason for the exception
> > >getting thrown from here?
> >
> >Do you have a catch for XMLException? If you are using Visual Studio
> >IDE you can also instruct it to break when any exception is thrown.
> >
> >Alberto
> >
> >
> >
> >
> >Disclaimer:
> >This e-mail may contain trade secrets or privileged, undisclosed or
> >otherwise confidential information. If you have received this e-mail
> >in
>
> >error, you are hereby notified that any review, copying or
> >distribution
>
> >of it is strictly prohibited. Please inform us immediately and
> >destroy the original transmittal. Thank you for your cooperation.
>
>
>
>
>Disclaimer:
>This e-mail may contain trade secrets or privileged, undisclosed or
>otherwise confidential information. If you have received this e-mail in
>error, you are hereby notified that any review, copying or distribution
>of it is strictly prohibited. Please inform us immediately and destroy
>the original transmittal. Thank you for your cooperation.
Disclaimer:
This e-mail may contain trade secrets or privileged, undisclosed or
otherwise confidential information. If you have received this e-mail
in error, you are hereby notified that any review, copying or
distribution of it is strictly prohibited. Please inform us
immediately and destroy the original transmittal. Thank you for your
cooperation.