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