/** * 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 static CSSParseException createCSSParseException(String message, Object location, int lineno, int column, Exception e) { String filename = null; int line = lineno; if (location != null) { // final String fullname = computeFilename(location); // filename = fullname.substring(fullname.lastIndexOf('/') + 1); // line = computeLineNumber(location, lineno); // // if (filename != null) { // message = filename + ":" + line + /* ":" + column + */ // ": " + message; // } message = location + ":" + lineno + ": " + message; // NOI18N } return new CSSParseException(message, filename, line, column, e); }
@Override public void warning(final CSSParseException cssParseException) throws CSSException { LOGGER.warn(cssParseException.toString(), cssParseException); }
private void log(TreeLogger.Type type, CSSParseException e) { log(type, "Line " + e.getLineNumber() + " column " + e.getColumnNumber() + ": " + e.getMessage()); }
protected CSSParseException createSkipWarning(final String key, final CSSParseException e) { String s = null; try { s = getSACParserMessages().getString(key); } catch (final MissingResourceException ex) { s = key; } return new CSSParseException(s, e.getURI(), e.getLineNumber(), e.getColumnNumber()); }
public void warning(CSSParseException cpe) { //System.out.println("CSS Parse Warning"); //System.out.println(cpe.getLineNumber() + ": " + cpe.getLocalizedMessage()); parseErrors.add(new DefaultCssSyntaxErrorInfo(cpe.getLineNumber(), cpe.getLocalizedMessage())); } public void error(CSSParseException cpe) {
private boolean ignore(CSSParseException e) { return e.getURI().contains("/yui/"); } });
/** * 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() ); }
private void log(TreeLogger.Type type, CSSParseException e) { log(type, "Line " + e.getLineNumber() + " column " + e.getColumnNumber() + ": " + e.getMessage()); }
public void error(CSSParseException cpe) { //System.out.println("CSS Parse Error"); //System.out.println(cpe.getLineNumber() + ": " + cpe.getLocalizedMessage()); parseErrors.add(new DefaultCssSyntaxErrorInfo(cpe.getLineNumber(), cpe.getLocalizedMessage())); } public void fatalError(CSSParseException cpe) {
private boolean ignore(CSSParseException e) { return e.getURI().contains("/yui/"); } });
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; }
protected CSSParseException toCSSParseException(final String messageKey, final Object[] msgParams, final Locator locator) { final String messagePattern = getSACParserMessages().getString(messageKey); return new CSSParseException(MessageFormat.format(messagePattern, msgParams), locator); }
private void log(TreeLogger.Type type, CSSParseException e) { log(type, "Line " + e.getLineNumber() + " column " + e.getColumnNumber() + ": " + e.getMessage()); }
public void fatalError(CSSParseException cpe) { //System.out.println("CSS Parse Fatal Error"); //System.out.println(cpe.getLineNumber() + ": " + cpe.getLocalizedMessage()); parseErrors.add(new DefaultCssSyntaxErrorInfo(cpe.getLineNumber(), cpe.getLocalizedMessage())); } } // End of DefaultErrorHandler.
private boolean ignore(CSSParseException e) { return e.getURI().contains("/yui/"); } });
@Override public void warning(final CSSParseException cssParseException) throws CSSException { LOGGER.warn(cssParseException.toString(), cssParseException); }
/** * 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 reportWarningSkipText(Locator l, String text) { if (errorHandler != null && text != null) { errorHandler.warning(new CSSParseException("Skipping: " + text, l)); } }