Package ninja.diagnostics
Class DiagnosticErrorRenderer
- java.lang.Object
-
- ninja.diagnostics.DiagnosticErrorRenderer
-
public class DiagnosticErrorRenderer extends Object
Utility class for renderingDiagnosticError
instances as a Result. Does not rely on any 3rd party rendering library to permit rendering exceptions in the case where a template engine fails!- Author:
- Joe Lauer (https://twitter.com/jjlauer), Fizzed, Inc. (http://fizzed.com)
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DiagnosticErrorRenderer
build(Context context, Result result, DiagnosticError diagnosticError)
String
render()
void
renderResult(Context context, Result result)
static void
tryToRender(Context context, Result result, DiagnosticError diagnosticError, boolean throwInternalServerExceptionOnError)
-
-
-
Method Detail
-
render
public String render()
-
tryToRender
public static void tryToRender(Context context, Result result, DiagnosticError diagnosticError, boolean throwInternalServerExceptionOnError)
-
renderResult
public void renderResult(Context context, Result result) throws IOException
- Throws:
IOException
-
build
public static DiagnosticErrorRenderer build(Context context, Result result, DiagnosticError diagnosticError) throws IOException
- Throws:
IOException
-
-