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("Entering XH_DOMTreeHelper::ReadXMLNode() -
calling transcode");
XERCES_CPP_NAMESPACE::XMLString::transcode("LS",
tempStr, 3999);
}
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.