From b0769b7b3b8ff4c8e977175a44ca9c1105b4b7e1 Mon Sep 17 00:00:00 2001 From: David Abram Cargill <cargilld@apache.org> Date: Thu, 2 Feb 2006 11:43:03 +0000 Subject: [PATCH] Use errType of Error to be consistent with previous behaviour. git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@374368 13f79535-47bb-0310-9956-ffa450edef68 --- src/xercesc/validators/schema/XSDErrorReporter.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/xercesc/validators/schema/XSDErrorReporter.cpp b/src/xercesc/validators/schema/XSDErrorReporter.cpp index 8b0ca8b0e..c02755498 100644 --- a/src/xercesc/validators/schema/XSDErrorReporter.cpp +++ b/src/xercesc/validators/schema/XSDErrorReporter.cpp @@ -230,7 +230,13 @@ void XSDErrorReporter::emitError(const XMLException& except, { const XMLCh* const errText = except.getMessage(); const unsigned int toEmit = except.getCode(); - XMLErrorReporter::ErrTypes errType = XMLErrs::errorType((XMLErrs::Codes) toEmit); + //Before the code was modified to call this routine it used to use + //the XMLErrs::DisplayErrorMessage error message, which is just {'0'} + //and that error message has errType of Error. So to be consistent + //with previous behaviour set the errType to be Error instead of + //getting the error type off of the exception. + //XMLErrorReporter::ErrTypes errType = XMLErrs::errorType((XMLErrs::Codes) toEmit); + XMLErrorReporter::ErrTypes errType = XMLErrorReporter::ErrType_Error; if (fErrorReporter) fErrorReporter->error(toEmit, XMLUni::fgExceptDomain, errType, errText, aLocator->getSystemId(), @@ -238,8 +244,8 @@ void XSDErrorReporter::emitError(const XMLException& except, aLocator->getColumnNumber()); // Bail out if its fatal an we are to give up on the first fatal error - if (errType == XMLErrorReporter::ErrType_Fatal && fExitOnFirstFatal) - throw (XMLErrs::Codes) toEmit; + //if (errType == XMLErrorReporter::ErrType_Fatal && fExitOnFirstFatal) + // throw (XMLErrs::Codes) toEmit; } XERCES_CPP_NAMESPACE_END -- GitLab