public static Location newLocation(CSSParseException cpe) {
    LocationImpl loc = new LocusTransformer().new LocationImpl();
    try {
      loc.setColumnNumber(cpe.getColumnNumber());
      loc.setLineNumber(cpe.getLineNumber());
      loc.setSystemId(cpe.getURI());
    } catch (Exception e) {
    }

    return loc;
  }
示例#2
0
 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());
 }