dbertoni 01/07/11 22:11:11
Modified: c/src/TestXSLT process.cpp
Log:
Implemented improved exception information. Removed unnecessary template
instantiation code.
Revision Changes Path
1.69 +36 -39 xml-xalan/c/src/TestXSLT/process.cpp
Index: process.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/TestXSLT/process.cpp,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -r1.68 -r1.69
--- process.cpp 2001/07/08 19:16:57 1.68
+++ process.cpp 2001/07/12 05:11:07 1.69
@@ -262,10 +262,6 @@
-#if defined(XALAN_NEEDS_EXPLICIT_TEMPLATE_INSTANTIATION)
-#include<stl/_vector.c>
-#endif
-
typedef vector<pair<const char*, const char*> > StringPairVectorType;
@@ -1154,62 +1150,63 @@
{
cout << "\nXSLException ";
-#if defined(XALAN_OSTREAM_HAS_WCHAR_T)
- cout << "Type is : ";
+ cout << "Type is: " << e.getType() << endl;
- OutputString(cout, e.getType());
+ cout << "Message is: " << e.getMessage() << " (";
- cout << endl;
+ const XalanDOMString& theURI = e.getURI();
- cout << "Message is : ";
+ if (length(theURI) != 0)
+ {
+ cout << theURI;
+ }
+ else
+ {
+ cout << "Unknown URI";
+ }
- OutputString(cout, e.getMessage());
+ const int theLineNumber = e.getLineNumber();
- cout << endl;
-#else
- cout << "Type is : " << e.getType() << endl;
+ if (theLineNumber != -1)
+ {
+ cout << ", line " << theLineNumber;
+ }
+ else
+ {
+ cout << ", unknown line";
+ }
- cout << "Message is : " << e.getMessage() << endl;
-#endif
+ const int theColumnNumber = e.getColumnNumber();
+
+ if (theColumnNumber != -1)
+ {
+ cout << ", column " << theColumnNumber;
+ }
+ else
+ {
+ cout << ", unknown column";
+ }
+
+ cout << ")" << endl;
+
theResult = -1;
}
catch (SAXException& e)
{
cout << "\nSAXException ";
-
-#if defined(XALAN_OSTREAM_HAS_WCHAR_T)
- cout << "Message is : ";
-
- OutputString(cout, e.getMessage());
- cout << endl;
-#else
- cout << "Message is : " << e.getMessage() << endl;
+ cout << "Message is: " << e.getMessage() << endl;
-#endif
theResult = -2;
}
catch (XMLException& e)
{
cout << "\nXMLException ";
-
-#if defined(XALAN_OSTREAM_HAS_WCHAR_T)
- cout << "Type is : ";
-
- OutputString(cout, e.getType());
- cout << endl;
+ cout << "Type is: " << e.getType() << endl;
- cout << "Message is : ";
+ cout << "Message is: " << e.getMessage() << endl;
- OutputString(cout, e.getMessage());
-
- cout << endl;
-#else
- cout << "Type is : " << e.getType() << endl;
-
- cout << "Message is : " << e.getMessage() << endl;
-#endif
theResult = -3;
}
catch(const XalanDOMException& e)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]