title: Get error string from Jericho SourceFormatter
body: <p>I'm using jericho's SourceFormatter to do indentation of HTML.
  Right now if there is an issue in my HTML formatter sends it to server console.</p>
  
  <p>How can I catch error and output it into my log system (actually I want to get it as a String/Object)?</p>
  
  <p>Here is example of code I use</p>
  
  <pre><code>private String indent(String html) {
      SourceFormatter formatter = new SourceFormatter(new Source(html));
      formatter.setIndentString("\t");
      formatter.setTidyTags(false);
      formatter.setCollapseWhiteSpace(true);
  
      return formatter.toString(); // if HTML have issues, they go to server's consol
  }
  </code></pre>
  
  <p><a href="http://jericho.htmlparser.net/docs/javadoc/net/htmlparser/jericho/LoggerProvider.html" rel="nofollow">LoggerProvider</a> - represent loggin system of hericho</p>