private void log(TreeLogger.Type type, CSSParseException e) { log(type, "Line " + e.getLineNumber() + " column " + e.getColumnNumber() + ": " + e.getMessage()); }
/** * Receive notification of a warning. <p/> <p>CSS parsers will use this method to report conditions that are not * errors or fatal errors as defined by the XML 1.0 recommendation. The default behaviour is to take no action.</p> * <p/> <p>The CSS parser must continue to provide normal parsing events after invoking this method: it should still * be possible for the application to process the document through to the end.</p> * * @param exception The warning information encapsulated in a CSS parse exception. * @throws CSSException Any CSS exception, possibly wrapping another exception. * @see CSSParseException */ public void warning( CSSParseException exception ) throws CSSException { logger.warn( "Warning: " + exception.getMessage() ); }
public void error(final CSSParseException exception) throws CSSException { final StringBuilder sb = new StringBuilder(); sb.append(exception.getURI()) .append(" [") .append(exception.getLineNumber()) .append(":") .append(exception.getColumnNumber()) .append("] ") .append(exception.getMessage()); System.err.println(sb.toString()); }
public void fatalError(final CSSParseException exception) throws CSSException { final StringBuilder sb = new StringBuilder(); sb.append(exception.getURI()) .append(" [") .append(exception.getLineNumber()) .append(":") .append(exception.getColumnNumber()) .append("] ") .append(exception.getMessage()); System.err.println(sb.toString()); } }
public void error(final CSSParseException exception) throws CSSException { final StringBuilder sb = new StringBuilder(); sb.append(exception.getURI()) .append(" [") .append(exception.getLineNumber()) .append(":") .append(exception.getColumnNumber()) .append("] ") .append(exception.getMessage()); System.err.println(sb.toString()); }
public void warning(final CSSParseException exception) throws CSSException { final StringBuilder sb = new StringBuilder(); sb.append(exception.getURI()) .append(" [") .append(exception.getLineNumber()) .append(":") .append(exception.getColumnNumber()) .append("] ") .append(exception.getMessage()); System.err.println(sb.toString()); }
public void warning(final CSSParseException exception) throws CSSException { final StringBuilder sb = new StringBuilder(); sb.append(exception.getURI()) .append(" [") .append(exception.getLineNumber()) .append(":") .append(exception.getColumnNumber()) .append("] ") .append(exception.getMessage()); System.err.println(sb.toString()); }
public void fatalError(final CSSParseException exception) throws CSSException { final StringBuilder sb = new StringBuilder(); sb.append(exception.getURI()) .append(" [") .append(exception.getLineNumber()) .append(":") .append(exception.getColumnNumber()) .append("] ") .append(exception.getMessage()); System.err.println(sb.toString()); } }
private static String createProblemDescription( String type, CSSParseException exception ) { String pattern = "{0}: {1} in {2} at pos [{3}:{4}]"; Object[] arguments = { type, exception.getMessage(), exception.getURI(), String.valueOf( exception.getLineNumber() ), String.valueOf( exception.getColumnNumber() ) }; return MessageFormat.format( pattern, arguments ); } }
@Override public void fatalError(CSSParseException arg0) throws CSSException { System.out.println("FATAL Error when parsing file \n" + arg0.getURI() + " on line " + arg0.getLineNumber() + ", column " + arg0.getColumnNumber()); System.out.println(arg0.getMessage() + "\n"); }
@Override public void warning(CSSParseException arg0) throws CSSException { System.out.println("Warning when parsing file \n" + arg0.getURI() + " on line " + arg0.getLineNumber() + ", column " + arg0.getColumnNumber()); System.out.println(arg0.getMessage() + "\n"); }
@Override public void error(CSSParseException arg0) throws CSSException { System.out.println("Error when parsing file \n" + arg0.getURI() + " on line " + arg0.getLineNumber() + ", column " + arg0.getColumnNumber()); System.out.println(arg0.getMessage() + "\n"); }
/** * Builds a message for the specified CSS parsing exception. * @param exception the CSS parsing exception to build a message for * @return a message for the specified CSS parsing exception */ private String buildMessage(final CSSParseException exception) { final String uri = exception.getURI(); final int line = exception.getLineNumber(); final int col = exception.getColumnNumber(); final String msg = exception.getMessage(); return uri + " [" + line + ":" + col + "] " + msg; }
/** * Builds a message for the specified CSS parsing exception. * @param exception the CSS parsing exception to build a message for * @return a message for the specified CSS parsing exception */ private String buildMessage(final CSSParseException exception) { final String uri = exception.getURI(); final int line = exception.getLineNumber(); final int col = exception.getColumnNumber(); final String msg = exception.getMessage(); return uri + " [" + line + ":" + col + "] " + msg; }
private void logException(CSSParseException e) { String formattedMessage = MessageFormat.format("Problem parsing ''{0}'' resource: {1}", getResourceLocator(), e.getMessage()); if (LOGGER.isDebugEnabled()) { LOGGER.debug(formattedMessage, e); } else { LOGGER.warn(formattedMessage); } }
/** * Builds a message for the specified CSS parsing exception. * @param exception the CSS parsing exception to build a message for * @return a message for the specified CSS parsing exception */ private String buildMessage(final CSSParseException exception) { final String uri = exception.getURI(); final int line = exception.getLineNumber(); final int col = exception.getColumnNumber(); final String msg = exception.getMessage(); return uri + " [" + line + ":" + col + "] " + msg; }
private void log(TreeLogger.Type type, CSSParseException e) { log(type, "Line " + e.getLineNumber() + " column " + e.getColumnNumber() + ": " + e.getMessage()); }
private void log(TreeLogger.Type type, CSSParseException e) { log(type, "Line " + e.getLineNumber() + " column " + e.getColumnNumber() + ": " + e.getMessage()); }