Return-Path: Delivered-To: apmail-xml-xalan-cvs-archive@xml.apache.org Received: (qmail 33512 invoked by uid 500); 10 Sep 2002 06:45:06 -0000 Mailing-List: contact xalan-cvs-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: Delivered-To: mailing list xalan-cvs@xml.apache.org Received: (qmail 33501 invoked from network); 10 Sep 2002 06:45:06 -0000 Date: 10 Sep 2002 06:45:05 -0000 Message-ID: <20020910064505.16231.qmail@icarus.apache.org> From: dbertoni@apache.org To: xml-xalan-cvs@apache.org Subject: cvs commit: xml-xalan/c/src/XSLT ElemMessage.cpp ElemMessage.hpp X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N dbertoni 2002/09/09 23:45:05 Modified: c/src/XSLT ElemMessage.cpp ElemMessage.hpp Log: Pass Locator to exception on terminate. Revision Changes Path 1.17 +27 -6 xml-xalan/c/src/XSLT/ElemMessage.cpp Index: ElemMessage.cpp =================================================================== RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemMessage.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- ElemMessage.cpp 10 Sep 2002 05:50:33 -0000 1.16 +++ ElemMessage.cpp 10 Sep 2002 06:45:05 -0000 1.17 @@ -2,7 +2,7 @@ * The Apache Software License, Version 1.1 * * - * Copyright (c) 1999 The Apache Software Foundation. All rights + * Copyright (c) 1999-2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without @@ -140,23 +140,44 @@ executionContext, theResult.get()); - + const Locator* const theLocator = getLocator(); + executionContext.message( theString, executionContext.getCurrentNode(), - getLocator()); + theLocator); if (m_terminate == true) { - throw ElemMessageTerminateException(theString); + if (theLocator != 0) + { + throw ElemMessageTerminateException(*theLocator, theString); + } + else + { + throw ElemMessageTerminateException(theString); + } } } ElemMessage::ElemMessageTerminateException::ElemMessageTerminateException(const XalanDOMString& theMessage) : - XSLTProcessorException(theMessage, - TranscodeFromLocalCodePage("ElemMessageTerminateException")) + XSLTProcessorException( + theMessage, + TranscodeFromLocalCodePage("ElemMessageTerminateException")) +{ +} + + + +ElemMessage::ElemMessageTerminateException::ElemMessageTerminateException( + const Locator& theLocator, + const XalanDOMString& theMessage) : + XSLTProcessorException( + theLocator, + theMessage, + TranscodeFromLocalCodePage("ElemMessageTerminateException")) { } 1.11 +10 -1 xml-xalan/c/src/XSLT/ElemMessage.hpp Index: ElemMessage.hpp =================================================================== RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemMessage.hpp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- ElemMessage.hpp 9 Mar 2001 16:20:00 -0000 1.10 +++ ElemMessage.hpp 10 Sep 2002 06:45:05 -0000 1.11 @@ -2,7 +2,7 @@ * The Apache Software License, Version 1.1 * * - * Copyright (c) 1999 The Apache Software Foundation. All rights + * Copyright (c) 1999-2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without @@ -110,6 +110,15 @@ */ ElemMessageTerminateException(const XalanDOMString& theMessage); + /** + * Construct an ElemMessageTerminateException object + * + * @param theLocator The Locator to use for line number information, etc. + * @param theMessage message to print when exception thrown + */ + ElemMessageTerminateException( + const Locator& theLocator, + const XalanDOMString& theMessage); virtual ~ElemMessageTerminateException(); --------------------------------------------------------------------- To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org For additional commands, e-mail: xalan-cvs-help@xml.apache.org