public class MagicScriptError extends Object
| 构造器和说明 |
|---|
MagicScriptError() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
error(String message,
Span location)
Create an error message based on the provided message and location, highlighting the location in the line on which the
error happened.
|
static void |
error(String message,
Span location,
Throwable cause)
Create an error message based on the provided message and location, highlighting the location in the line on which the
error happened.
|
static void |
error(String message,
TokenStream stream)
Create an error message based on the provided message and stream, highlighting the line on which the error happened.
|
static Throwable |
unwrap(Throwable root) |
public static void error(String message, TokenStream stream)
Create an error message based on the provided message and stream, highlighting the line on which the error happened. If the stream has more tokens, the next token will be highlighted. Otherwise the end of the source of the stream will be highlighted.
Throws a RuntimeException
public static void error(String message, Span location, Throwable cause)
MagicScriptExceptionpublic static void error(String message, Span location)
MagicScriptExceptionCopyright © 2020–2021. All rights reserved.