[ http://issues.apache.org/jira/browse/XALANJ-1769?page=all ]
Brian Minchau updated XALANJ-1769: ---------------------------------- Version: Latest Development Code (was: 2.5Dx) > MsgMgr.message() should call fatalError if terminate is true > ------------------------------------------------------------ > > Key: XALANJ-1769 > URL: http://issues.apache.org/jira/browse/XALANJ-1769 > Project: XalanJ2 > Type: Bug > Components: transformation, Xalan-interpretive > Versions: Latest Development Code > Environment: Operating System: Solaris > Platform: Sun > Reporter: Hans Riezebos > Assignee: Xalan Developers Mailing List > > The method "message" in class "org.apache.xalan.transformer.MsgMgr" does not > use its terminate parameter if it has an ErrorListener. > If terminate is true it should call fatalError() on this ErrorListener > instead > of warning(). > This also would solve bug# 13453. > Suggestion is to change the existing method: > public void message(SourceLocator srcLctr, String msg, boolean terminate) > throws TransformerException > { > ErrorListener errHandler = m_transformer.getErrorListener(); > if (null != errHandler) > { > errHandler.warning(new TransformerException(msg, srcLctr)); > } > else > { > if (terminate) > throw new TransformerException(msg, srcLctr); > else > System.out.println(msg); > } > } > into: > public void message(SourceLocator srcLctr, String msg, boolean terminate) > throws TransformerException > { > ErrorListener errHandler = m_transformer.getErrorListener(); > if (null != errHandler) > { > if (terminate) > errHandler.fatalError(new TransformerException(msg, srcLctr)); > else > errHandler.warning(new TransformerException(msg, srcLctr)); > } > else > { > if (terminate) > throw new TransformerException(msg, srcLctr); > else > System.out.println(msg); > } > } > When the "message" method is called from "execute" in > org.apache.xalan.templates.ElemMessage, currently two exceptions are > generated. The first one shows the user message and the second one doesn't. > Since the second one may be caught by the environment (for example Cocoon), > the user message is lost. With the proposed change only one exception is > raised and the user message will be reported to the environment. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]