Class PrettyException

  • All Implemented Interfaces:
    java.io.Serializable, net.morimekta.util.Displayable

    public class PrettyException
    extends SerializerException
    Exception when totalizing fails to make token or read the expected content.
    See Also:
    Serialized Form
    • Constructor Detail

      • PrettyException

        public PrettyException​(net.morimekta.util.lexer.LexerException e,
                               java.lang.String format,
                               java.lang.Object... args)
      • PrettyException

        public PrettyException​(java.lang.String format,
                               java.lang.Object... args)
      • PrettyException

        public PrettyException​(java.lang.Throwable cause,
                               java.lang.String format,
                               java.lang.Object... args)
      • PrettyException

        public PrettyException​(PrettyToken token,
                               java.lang.String format,
                               java.lang.Object... args)
    • Method Detail

      • getLineNo

        public int getLineNo()
        Returns:
        The 1-indexed line number of the fault.
      • getLinePos

        public int getLinePos()
        Returns:
        The 1-indexed position on the given line.
      • getLength

        public int getLength()
        Returns:
        The number of u16 chars representing the fault.
      • getLine

        @Nullable
        public java.lang.String getLine()
        Returns:
        The whole line of the fault, not including line feed.
      • getFile

        @Nullable
        public java.lang.String getFile()
        Returns:
        The file that contains the fault.
      • setLine

        public PrettyException setLine​(java.lang.CharSequence line)
      • initCause

        public PrettyException initCause​(java.lang.Throwable cause)
        Overrides:
        initCause in class java.lang.Throwable
      • displayString

        @Nonnull
        public java.lang.String displayString()
        Specified by:
        displayString in interface net.morimekta.util.Displayable
        Overrides:
        displayString in class SerializerException