Record Class ErrorOutput

java.lang.Object
java.lang.Record
smile.util.ipynb.ErrorOutput
Record Components:
ename - the exception class name (e.g. "NameError").
evalue - the exception message / value.
traceback - the list of traceback frame strings, each possibly containing ANSI escape sequences for color.
All Implemented Interfaces:
Output

public record ErrorOutput(String ename, String evalue, List<String> traceback) extends Record implements Output
An error output produced when a cell raises an exception during execution (output type "error").
  • Constructor Details

    • ErrorOutput

      public ErrorOutput(String ename, String evalue, List<String> traceback)
      Creates an instance of a ErrorOutput record class.
      Parameters:
      ename - the value for the ename record component
      evalue - the value for the evalue record component
      traceback - the value for the traceback record component
  • Method Details

    • outputType

      public String outputType()
      Description copied from interface: Output
      Returns the output type identifier.
      Specified by:
      outputType in interface Output
      Returns:
      one of "stream", "display_data", "execute_result", or "error".
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • ename

      public String ename()
      Returns the value of the ename record component.
      Returns:
      the value of the ename record component
    • evalue

      public String evalue()
      Returns the value of the evalue record component.
      Returns:
      the value of the evalue record component
    • traceback

      public List<String> traceback()
      Returns the value of the traceback record component.
      Returns:
      the value of the traceback record component