Sha256: 22490dc4acfada9449229953eca2326a7ed4325afc9ec5fbb644b0d6e2b2d3d7
Contents?: true
Size: 1.09 KB
Versions: 46
Compression:
Stored size: 1.09 KB
Contents
package nokogiri.internals; import javax.xml.transform.ErrorListener; import javax.xml.transform.TransformerException; /** * Error Listener for XSLT transformer * * @author Yoko Harada <yokolet@gmail.com> */ public class NokogiriXsltErrorListener implements ErrorListener { public enum ErrorType { SUCCESS, WARNING, ERROR, FATAL } private ErrorType type = ErrorType.SUCCESS; private String errorMessage = null; private Exception exception = null; public void warning(TransformerException ex) { type = ErrorType.WARNING; setError(ex); } public void error(TransformerException ex) { type = ErrorType.ERROR; setError(ex); } public void fatalError(TransformerException ex) { type = ErrorType.FATAL; setError(ex); } private void setError(TransformerException ex) { errorMessage = ex.getMessage(); exception = ex; } public String getErrorMessage() { return errorMessage; } public ErrorType getErrorType() { return type; } public Exception getException() { return exception; } }
Version data entries
46 entries across 46 versions & 2 rubygems