class DefaultErrorsPrinter extends DefaultStackTracePrinter implements CodeSnippetPrinter
Default implementation of the StackTracePrinter interface.
Type | Name and description |
---|---|
ResourceLocator |
resourceLocator |
Constructor and description |
---|
DefaultErrorsPrinter() |
DefaultErrorsPrinter(ResourceLocator resourceLocator) |
Type Params | Return Type | Name and description |
---|---|---|
|
java.lang.String |
formatCodeSnippetEnd(Resource resource, int lineNumber) |
|
protected java.lang.String |
formatCodeSnippetErrorLine(int currentLineNumber, java.lang.Object currentLine) |
|
protected java.lang.String |
formatCodeSnippetErrorLine(int currentLineNumber, java.lang.Object currentLine, java.util.Map attrs) |
|
protected java.lang.String |
formatCodeSnippetLine(int currentLineNumber, java.lang.Object currentLine) |
|
protected java.lang.String |
formatCodeSnippetLine(int currentLineNumber, java.lang.Object currentLine, java.util.Map attrs) |
|
java.lang.String |
formatCodeSnippetStart(Resource resource, int lineNumber) |
|
java.lang.String |
formatCodeSnippetStart(Resource resource, int lineNumber, java.util.Map attrs) |
|
protected java.lang.String |
getFileName(java.lang.StackTraceElement te) |
|
protected Resource |
getFileNameInfo(java.lang.Throwable cause, Resource res) |
|
protected int |
getLineNumberInfo(java.lang.Throwable cause, int defaultInfo) |
|
protected java.lang.Throwable |
getRootCause(java.lang.Throwable ex) Obtains the root cause of the given exception |
|
java.lang.String |
prettyPrintCodeSnippet(java.lang.Throwable exception) |
|
java.lang.String |
prettyPrintCodeSnippet(java.lang.Throwable exception, java.util.Map attrs) |
Methods inherited from class | Name |
---|---|
class DefaultStackTracePrinter |
getFileName, makeRelativeIfPossible, prettyPrint, prettyPrint, printCausedByMessage, printFailureLocation, printHeader, printLastEntry, printStackLine, shouldSkipNextCause |
Obtains the root cause of the given exception
ex
- The exceptionGroovy Documentation