Package io.github.qishr.cascara.common.diagnostic
Class DiagnosticBuilder
java.lang.Object
io.github.qishr.cascara.common.diagnostic.DiagnosticBuilder
@io.github.qishr.cascara.common.annotation.Experimental
public class DiagnosticBuilder
Constructor Summary
| Constructor | Description |
|---|---|
| DiagnosticBuilder() |
Method Summary
| Modifier and Type | Method | Description |
|---|---|---|
| public static Diagnostic | build(String source, Level level, String format, Object[] details) | With format string. |
| public static Diagnostic | build(String source, Level level, StackTraceElement[] stackTrace, Throwable cause, DiagnosticMessage message, Object[] details) | With diagnostic message, and cause |
| public static Diagnostic | build(URI uri, int line, int column, int startOffset, int endOffset, String source, Level level, StackTraceElement[] stackTrace, Throwable cause, DiagnosticMessage message, Object[] details) | With diagnostic message, location, and cause |
| public static Diagnostic | build(Token token, String source, Level level, StackTraceElement[] stackTrace, Throwable cause, DiagnosticMessage message, Object[] details) | With diagnostic message, token, and cause |
Method Details
build
public static Diagnostic build(String source, Level level, String format, Object[] details)
With format string.This is used for debug and trace reports. They do not carry a stack trace or cause.
build
public static Diagnostic build(String source, Level level, StackTraceElement[] stackTrace, Throwable cause, DiagnosticMessage message, Object[] details)
With diagnostic message, and cause
build
public static Diagnostic build(URI uri, int line, int column, int startOffset, int endOffset, String source, Level level, StackTraceElement[] stackTrace, Throwable cause, DiagnosticMessage message, Object[] details)
With diagnostic message, location, and cause
build
public static Diagnostic build(Token token, String source, Level level, StackTraceElement[] stackTrace, Throwable cause, DiagnosticMessage message, Object[] details)
With diagnostic message, token, and cause