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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to