/** * Returns an XmlError for the given message, located in the given file and {@link #SEVERITY_ERROR}. * @param message the error message * @param sourceName the URL or other name for the file */ public static XmlError forSource(String message, String sourceName) { return forLocation(message, SEVERITY_ERROR, sourceName, -1, -1, -1); }
/** * Returns an XmlError for the given message, with the given severity, located in the given file. * @param code the error code * @param args the arguments to use in formatting the error message * @param severity the severity ({@link #SEVERITY_ERROR}, {@link #SEVERITY_WARNING}, or {@link #SEVERITY_INFO}) * @param sourceName the URL or other name for the file */ public static XmlError forSource(String code, Object[] args, int severity, String sourceName) { return forLocation(code, args, severity, sourceName, -1, -1, -1); }
/** * Returns an XmlError for the given message, with the given severity, located in the given file. * @param message the error message * @param severity the severity ({@link #SEVERITY_ERROR}, {@link #SEVERITY_WARNING}, or {@link #SEVERITY_INFO}) * @param sourceName the URL or other name for the file */ public static XmlError forSource(String message, int severity, String sourceName) { return forLocation(message, severity, sourceName, -1, -1, -1); }
public static void addError(Collection errorListener, String code, Object[] args, URL location) { XmlError err = XmlError.forLocation( code, args, XmlError.SEVERITY_ERROR, location.toString(), 0, 0, 0); errorListener.add(err); }
public static void addError(Collection errorListener, String code, Object[] args, File location) { XmlError err = XmlError.forLocation( code, args, XmlError.SEVERITY_ERROR, location.toURI().toString(), 0, 0, 0); errorListener.add(err); }
private XPathCompileException newError ( String msg ) { XmlError err = XmlError.forLocation( msg, XmlError.SEVERITY_ERROR, null, _line, _column, _offset ); return new XPathCompileException( err ); }
private void addError(String msg) { String source = null; Location location = getLocation(); if (location != null) { source = location.getPublicId(); if (source==null) source = location.getSystemId(); _errorListener.add(XmlError.forLocation(msg, source, location)); } else _errorListener.add(XmlError.forMessage(msg)); }
XmlError e = XmlError.forLocation(xse.getMessage(), path, loc.getLineNumber(), loc.getColumnNumber(),
public static XmlError errorForEvent(String code, Object[] args, int severity, Event event) { XmlCursor loc = event.getLocationAsCursor(); XmlError error; if (loc!=null) error = XmlError.forCursor(code, args, severity, loc); else { Location location = event.getLocation(); if (location!=null) { error = XmlError.forLocation(code, args, severity, location.getSystemId(), location.getLineNumber(), location.getColumnNumber(), location.getCharacterOffset()); } else { error = XmlError.forMessage(code, args, severity); } } return error; }
public static XmlError errorForEvent(String msg, int severity, Event event) { XmlCursor loc = event.getLocationAsCursor(); XmlError error; if (loc!=null) error = XmlError.forCursor(msg, severity, loc); else { Location location = event.getLocation(); if (location!=null) { error = XmlError.forLocation(msg, severity, location.getSystemId(), location.getLineNumber(), location.getColumnNumber(), location.getCharacterOffset()); } else { error = XmlError.forMessage(msg, severity); } } return error; }
XmlError.forLocation(e.getMessage(), (String) XmlOptions.safeGet(options, XmlOptions.DOCUMENT_SOURCE_NAME),
/** * Returns an XmlError for the given message, with the given severity, located in the given file. * @param code the error code * @param args the arguments to use in formatting the error message * @param severity the severity ({@link #SEVERITY_ERROR}, {@link #SEVERITY_WARNING}, or {@link #SEVERITY_INFO}) * @param sourceName the URL or other name for the file */ public static XmlError forSource(String code, Object[] args, int severity, String sourceName) { return forLocation(code, args, severity, sourceName, -1, -1, -1); }
/** * Returns an XmlError for the given message, with the given severity, located in the given file. * @param message the error message * @param severity the severity ({@link #SEVERITY_ERROR}, {@link #SEVERITY_WARNING}, or {@link #SEVERITY_INFO}) * @param sourceName the URL or other name for the file */ public static XmlError forSource(String message, int severity, String sourceName) { return forLocation(message, severity, sourceName, -1, -1, -1); }
/** * Returns an XmlError for the given message, with the given severity, located in the given file. * @param code the error code * @param args the arguments to use in formatting the error message * @param severity the severity ({@link #SEVERITY_ERROR}, {@link #SEVERITY_WARNING}, or {@link #SEVERITY_INFO}) * @param sourceName the URL or other name for the file */ public static XmlError forSource(String code, Object[] args, int severity, String sourceName) { return forLocation(code, args, severity, sourceName, -1, -1, -1); }
/** * Returns an XmlError for the given message, with the given severity, located in the given file. * @param message the error message * @param severity the severity ({@link #SEVERITY_ERROR}, {@link #SEVERITY_WARNING}, or {@link #SEVERITY_INFO}) * @param sourceName the URL or other name for the file */ public static XmlError forSource(String message, int severity, String sourceName) { return forLocation(message, severity, sourceName, -1, -1, -1); }
/** * Returns an XmlError for the given message, located in the given file and {@link #SEVERITY_ERROR}. * @param message the error message * @param sourceName the URL or other name for the file */ public static XmlError forSource(String message, String sourceName) { return forLocation(message, SEVERITY_ERROR, sourceName, -1, -1, -1); }
/** * Returns an XmlError for the given message, located in the given file and {@link #SEVERITY_ERROR}. * @param message the error message * @param sourceName the URL or other name for the file */ public static XmlError forSource(String message, String sourceName) { return forLocation(message, SEVERITY_ERROR, sourceName, -1, -1, -1); }
public static void addError(Collection errorListener, String code, Object[] args, URL location) { XmlError err = XmlError.forLocation( code, args, XmlError.SEVERITY_ERROR, location.toString(), 0, 0, 0); errorListener.add(err); }
public static void addError(Collection errorListener, String code, Object[] args, URL location) { XmlError err = XmlError.forLocation( code, args, XmlError.SEVERITY_ERROR, location.toString(), 0, 0, 0); errorListener.add(err); }
private XPathCompileException newError ( String msg ) { XmlError err = XmlError.forLocation( msg, XmlError.SEVERITY_ERROR, null, _line, _column, _offset ); return new XPathCompileException( err ); }