StringBuffer msg = new StringBuffer("<!--\n").append(pex.getLocalizedMessage()).append("\n"); pex.printStackTrace(writer); msg.append(stackTrace.toString()).append("\n-->");
StringBuffer msg = new StringBuffer("<!--\n").append(pex.getLocalizedMessage()).append("\n"); pex.printStackTrace(writer); msg.append(stackTrace.toString()).append("\n-->");
public void annotateHTMLContent(InputStream is, String charSet, String fileContext, CaptureSearchResult result) { ParseContext context = new ParseContext(); Node node; try { ContextAwareLexer lex = new ContextAwareLexer( new Lexer(new Page(is,charSet)),context); while((node = lex.nextNode()) != null) { // System.err.println("\nDEBUG-Node:js("+context.isInJS()+")css("+context.isInCSS()+"):"); // System.err.println("-------------------/START"); // System.err.println(node.toHtml(true)); // System.err.println("-------------------/END"); rules.handleNode(context, node); } rules.handleParseComplete(context); } catch (ParserException e) { // TODO Auto-generated catch block e.printStackTrace(); LOGGER.warning(fileContext + " " + e.getLocalizedMessage()); } catch (UnsupportedEncodingException e) { // TODO Auto-generated catch block e.printStackTrace(); LOGGER.warning(fileContext + " " + e.getLocalizedMessage()); } catch (IOException e) { LOGGER.warning(fileContext + " " + e.getLocalizedMessage()); } } }
public void annotateHTMLContent(InputStream is, String charSet, String fileContext, CaptureSearchResult result) { ParseContext context = new ParseContext(); Node node; try { ContextAwareLexer lex = new ContextAwareLexer( new Lexer(new Page(is,charSet)),context); while((node = lex.nextNode()) != null) { // System.err.println("\nDEBUG-Node:js("+context.isInJS()+")css("+context.isInCSS()+"):"); // System.err.println("-------------------/START"); // System.err.println(node.toHtml(true)); // System.err.println("-------------------/END"); rules.handleNode(context, node); } rules.handleParseComplete(context); } catch (ParserException e) { // TODO Auto-generated catch block e.printStackTrace(); LOGGER.warning(fileContext + " " + e.getLocalizedMessage()); } catch (UnsupportedEncodingException e) { // TODO Auto-generated catch block e.printStackTrace(); LOGGER.warning(fileContext + " " + e.getLocalizedMessage()); } catch (IOException e) { LOGGER.warning(fileContext + " " + e.getLocalizedMessage()); } } }