You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ja...@apache.org on 2001/09/10 03:15:18 UTC
cvs commit: xml-xerces/perl/Handler PerlExceptionHandler.cpp
jasons 01/09/09 18:15:18
Modified: perl/Handler PerlExceptionHandler.cpp
Log:
* Handler/PerlExceptionHandler.cpp (Repository):
* Handler/PerlContentCallbackHandler.cpp (Repository):
deleted all transcode strings
Revision Changes Path
1.5 +15 -5 xml-xerces/perl/Handler/PerlExceptionHandler.cpp
Index: PerlExceptionHandler.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/perl/Handler/PerlExceptionHandler.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- PerlExceptionHandler.cpp 2001/07/10 17:33:55 1.4
+++ PerlExceptionHandler.cpp 2001/09/10 01:15:18 1.5
@@ -140,11 +140,13 @@
void
PerlExceptionHandler::catchXMLException(const XMLException &e) {
if (!XMLExceptionHandler) {
+ char *errMsg = XMLString::transcode(e.getMessage());
cerr << "\nReceived XMLException without handler\n"
<< "Exception thrown in file: '" << e.getSrcFile() << "'\n"
<< "At line: '" << e.getSrcLine() << "'\n"
<< "Exception message is: \n"
- << XMLString::transcode(e.getMessage()) << "\n" << endl;
+ << errMsg << "\n" << endl;
+ delete [] errMsg;
XMLPlatformUtils::Terminate();
die("Received Exception without handler");
}
@@ -175,11 +177,13 @@
void
PerlExceptionHandler::catchDOMException(const DOM_DOMException &e) {
if (!DOMExceptionHandler) {
+ char *errMsg = e.msg.transcode();
cerr << "\nReceived DOMException without handler" << endl
<< "Exception code is: " << endl
<< e.code << endl
<< "Exception message is: " << endl
- << e.msg.transcode() << endl << endl;
+ << errMsg << endl << endl;
+ delete [] errMsg;
XMLPlatformUtils::Terminate();
die("Received Exception without handler");
}
@@ -210,11 +214,13 @@
void
PerlExceptionHandler::catchIDOMException(const IDOM_DOMException &e) {
if (!IDOMExceptionHandler) {
+ char *errMsg = XMLString::transcode(e.msg);
cerr << "\nReceived IDOMException without handler" << endl
<< "Exception code is: " << endl
<< e.code << endl
<< "Exception message is: " << endl
- << XMLString::transcode(e.msg) << endl << endl;
+ << errMsg << endl << endl;
+ delete [] errMsg;
XMLPlatformUtils::Terminate();
die("Received Exception without handler");
}
@@ -245,9 +251,11 @@
void
PerlExceptionHandler::catchSAXNotRecognizedException(const SAXNotRecognizedException &e) {
if (!SAXNotRecognizedExceptionHandler) {
+ char *errMsg = XMLString::transcode(e.getMessage());
cerr << "\nReceived SAXNotRecognizedException without handler" << endl
<< "Exception message is: " << endl
- << XMLString::transcode(e.getMessage()) << endl << endl;
+ << errMsg << endl << endl;
+ delete [] errMsg;
XMLPlatformUtils::Terminate();
die("Received Exception without handler");
}
@@ -278,9 +286,11 @@
void
PerlExceptionHandler::catchSAXNotSupportedException(const SAXNotSupportedException &e) {
if (!SAXNotSupportedExceptionHandler) {
+ char *errMsg = XMLString::transcode(e.getMessage());
cerr << "\nReceived SAXNotSupportedException without handler" << endl
<< "Exception message is: " << endl
- << XMLString::transcode(e.getMessage()) << endl << endl;
+ << errMsg << endl << endl;
+ delete [] errMsg;
XMLPlatformUtils::Terminate();
die("Received Exception without handler");
}
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org