DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12471>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12471

Message in ElemMessageTerminateException not set correctly

           Summary: Message in ElemMessageTerminateException not set
                    correctly
           Product: XalanC
           Version: 1.3.x
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: XalanC
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


The message is not set correctly when a ElemMessageTerminateException is thrown 
in ElemMessage::execute. Here is why:

StylesheetExecutionContext::GetAndReleaseCachedString   theResult
(executionContext);

executionContext.message(
   childrenToString(executionContext,theResult.get()),
   executionContext.getCurrentNode(),
   this);

   if (m_terminate == true)
   {
      throw ElemMessageTerminateException(theResult.get());
   }

As you can  see, we are counting on childrenToString to populate theResult. But 
it will not do so if it already has a cached version of the string. This change 
will probably fix the problem (not tested or even compiled)

const XalanDOMString & message =  childrenToString
(executionContext,theResult.get();

executionContext.message(
   message,
   executionContext.getCurrentNode(),
   this);

   if (m_terminate == true)
   {
      throw ElemMessageTerminateException(message)
   }

Reply via email to