Code example for TransformerException

0
 
    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);
    } 
  } 
 
  /** 
   * Warn the user of a problem. 
   * 
   * @param msg Message text to issue 
   * @throws XSLProcessorException thrown if the active ProblemListener and XPathContext decide