类 MagicScriptError

java.lang.Object
org.ssssssss.script.MagicScriptError

public class MagicScriptError extends Object
All errors reported by the library go through the static functions of this class.
  • 构造器详细资料

    • MagicScriptError

      public MagicScriptError()
  • 方法详细资料

    • error

      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

    • error

      public 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. Throws a MagicScriptException
    • error

      public 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. Throws a MagicScriptException
    • unwrap

      public static Throwable unwrap(Throwable root)
    • transfer

      public static void transfer(MagicScriptRuntime runtime, Throwable t)