public class DiagnosticErrorBuilder extends Object
DiagnosticError
instances.Constructor and Description |
---|
DiagnosticErrorBuilder() |
Modifier and Type | Method and Description |
---|---|
static DiagnosticError |
build400BadRequestDiagnosticError(Throwable cause,
boolean tryToReadLinesFromSourceCode) |
static DiagnosticError |
build401UnauthorizedDiagnosticError() |
static DiagnosticError |
build403ForbiddenDiagnosticError() |
static DiagnosticError |
build403ForbiddenDiagnosticError(Throwable cause,
boolean tryToReadLinesFromSourceCode) |
static DiagnosticError |
build404NotFoundDiagnosticError(boolean tryToReadLinesFromSourceCode) |
static DiagnosticError |
build404NotFoundDiagnosticError(Throwable cause,
boolean tryToReadLinesFromSourceCode) |
static DiagnosticError |
build500InternalServerErrorDiagnosticError(Throwable cause,
boolean tryToReadLinesFromSourceCode,
Result underlyingResult) |
static DiagnosticError |
buildDiagnosticError(String title,
Throwable throwable,
boolean tryToReadLinesFromSourceCode,
Result underlyingResult) |
static DiagnosticError |
buildDiagnosticError(String title,
Throwable throwable,
SourceSnippet snippet,
int lineNumberOfError,
Result underlyingResult) |
static DiagnosticError |
buildDiagnosticError(String title,
Throwable throwable,
String relativeSourcePath,
int lineNumberOfError,
Result underlyingResult) |
static DiagnosticError |
buildDiagnosticError(String title,
Throwable throwable,
String packageName,
String fileName,
int lineNumberOfError,
Result underlyingResult) |
static StackTraceElement |
findFirstStackTraceElementWithSourceCodeInProject(Throwable throwable) |
static String |
getSourceCodeRelativePathForStackTraceElement(StackTraceElement ste)
Calculates the relative path of the source code file of a StackTrace
element if its available.
|
static boolean |
sourceCodeExistsInProject(String sourceRelativePath) |
static SourceSnippet |
tryToReadSourceSnippet(String sourceRelativePath,
int lineFrom,
int lineTo) |
static SourceSnippet |
tryToReadSourceSnippetInPackage(String packageName,
String fileName,
int lineFrom,
int lineTo) |
public static DiagnosticError build404NotFoundDiagnosticError(boolean tryToReadLinesFromSourceCode)
public static DiagnosticError build404NotFoundDiagnosticError(Throwable cause, boolean tryToReadLinesFromSourceCode)
public static DiagnosticError build403ForbiddenDiagnosticError()
public static DiagnosticError build403ForbiddenDiagnosticError(Throwable cause, boolean tryToReadLinesFromSourceCode)
public static DiagnosticError build401UnauthorizedDiagnosticError()
public static DiagnosticError build500InternalServerErrorDiagnosticError(Throwable cause, boolean tryToReadLinesFromSourceCode, Result underlyingResult)
public static DiagnosticError build400BadRequestDiagnosticError(Throwable cause, boolean tryToReadLinesFromSourceCode)
public static DiagnosticError buildDiagnosticError(String title, Throwable throwable, boolean tryToReadLinesFromSourceCode, Result underlyingResult)
public static DiagnosticError buildDiagnosticError(String title, Throwable throwable, String packageName, String fileName, int lineNumberOfError, Result underlyingResult)
public static DiagnosticError buildDiagnosticError(String title, Throwable throwable, String relativeSourcePath, int lineNumberOfError, Result underlyingResult)
public static DiagnosticError buildDiagnosticError(String title, Throwable throwable, SourceSnippet snippet, int lineNumberOfError, Result underlyingResult)
public static StackTraceElement findFirstStackTraceElementWithSourceCodeInProject(Throwable throwable)
public static boolean sourceCodeExistsInProject(String sourceRelativePath)
public static SourceSnippet tryToReadSourceSnippetInPackage(String packageName, String fileName, int lineFrom, int lineTo)
public static SourceSnippet tryToReadSourceSnippet(String sourceRelativePath, int lineFrom, int lineTo)
public static String getSourceCodeRelativePathForStackTraceElement(StackTraceElement ste)
ste
- The stack trace elementCopyright © 2019 ninjaframework. All rights reserved.