Skip to content

StefanLiebenberg/html-exception-formatter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

html-exception-formatter

a Java library to format exceptions to pretty html

Usage

Very basic usage

  String html = new HtmlExceptionsFormatter().toString(exception);

Setting Options

  HtmlExceptionFormatOptions options = new HtmlExceptionFormatOptions();
  options.setPrintDetails(true);
  String html = new HtmlExceptionsFormatter().toString(exception);

Non Exception messages

  HtmlExceptionFormatOptions options = new HtmlExceptionFormatOptions();
  options.setPrintDetails(true);
  String html = new HtmlExceptionsFormatter().toString("404 Route not found", "The selected \"/noPath\" route wasn't found.");

Writing into Appendable

  HtmlExceptionFormatOptions options = new HtmlExceptionFormatOptions();
  options.setPrintDetails(true);
  new HtmlExceptionsFormatter().formatMessage(System.err, exception);

About

a Java library to format exceptions to pretty html

Resources

License

Stars

Watchers

Forks

Packages

No packages published