Package jline.io

Class ErrorId

java.lang.Object
jline.io.ErrorId
All Implemented Interfaces:
Serializable

public final class ErrorId extends Object implements Serializable
An identifier of the cross-codebase error vocabulary, LINE:<category>:<kind>.

The same string is a MATLAB error identifier, the identifier of a Python LineError and the id() of a C++ line::Error, so a test, SolverAUTO and the parity harness can ask why a solver failed instead of matching message text. The categories and their meaning are listed in _kb/17-error-vocabulary.md.

UNCLASSIFIED (LINE:Error) is the legacy id of a diagnostic that has not been classified yet; it is not a category.

See Also:
  • Field Details

    • UNSUPPORTED

      public static final String UNSUPPORTED
      A solver, method or analysis refuses the model or request.
      See Also:
    • NUMERICAL

      public static final String NUMERICAL
      The computation ran and cannot produce a trustworthy answer.
      See Also:
    • INPUT

      public static final String INPUT
      The model, argument, option or file is malformed or inconsistent.
      See Also:
    • EXTERNAL

      public static final String EXTERNAL
      A tool, binary, service or bridge LINE depends on is missing or failed.
      See Also:
    • INTERNAL

      public static final String INTERNAL
      An invariant LINE itself should guarantee was violated.
      See Also:
    • UNCLASSIFIED

      public static final ErrorId UNCLASSIFIED
      The legacy id of a diagnostic not yet classified.
  • Method Details

    • of

      public static ErrorId of(String category, String kind)
      Builds an id, or LINE:internal:BadErrorId when the category is not one of the five or the kind does not match [A-Za-z][A-Za-z0-9_]*.
    • unsupported

      public static ErrorId unsupported(String kind)
    • numerical

      public static ErrorId numerical(String kind)
    • input

      public static ErrorId input(String kind)
    • external

      public static ErrorId external(String kind)
    • internal

      public static ErrorId internal(String kind)
    • parse

      public static ErrorId parse(String id)
      Parses a full identifier. LINE:Error gives UNCLASSIFIED; anything else outside the grammar gives LINE:internal:BadErrorId.
    • getCategory

      public String getCategory()
      The category, or null for UNCLASSIFIED.
    • getKind

      public String getKind()
      The kind, or null for UNCLASSIFIED.
    • is

      public boolean is(String category)
      True when this id is in the given category.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object