本文整理汇总了Java中com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg.ERROR_LISTENER_NULL_ERR属性的典型用法代码示例。如果您正苦于以下问题:Java ErrorMsg.ERROR_LISTENER_NULL_ERR属性的具体用法?Java ErrorMsg.ERROR_LISTENER_NULL_ERR怎么用?Java ErrorMsg.ERROR_LISTENER_NULL_ERR使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg
的用法示例。
在下文中一共展示了ErrorMsg.ERROR_LISTENER_NULL_ERR属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setErrorListener
/**
* javax.xml.transform.sax.TransformerFactory implementation.
* Set the error event listener for the TransformerFactory, which is used
* for the processing of transformation instructions, and not for the
* transformation itself.
*
* @param listener The error listener to use with the TransformerFactory
* @throws IllegalArgumentException
*/
@Override
public void setErrorListener(ErrorListener listener)
throws IllegalArgumentException
{
if (listener == null) {
ErrorMsg err = new ErrorMsg(ErrorMsg.ERROR_LISTENER_NULL_ERR,
"TransformerFactory");
throw new IllegalArgumentException(err.toString());
}
_errorListener = listener;
}
示例2: setErrorListener
/**
* Implements JAXP's Transformer.setErrorListener()
* Set the error event listener in effect for the transformation.
* Register a message handler in the translet in order to forward
* xsl:messages to error listener.
*
* @param listener The error event listener to use
* @throws IllegalArgumentException
*/
@Override
public void setErrorListener(ErrorListener listener)
throws IllegalArgumentException {
if (listener == null) {
ErrorMsg err = new ErrorMsg(ErrorMsg.ERROR_LISTENER_NULL_ERR,
"Transformer");
throw new IllegalArgumentException(err.toString());
}
_errorListener = listener;
// Register a message handler to report xsl:messages
if (_translet != null)
_translet.setMessageHandler(new MessageHandler(_errorListener));
}