Package gamedata

Class ResourceParserException

  • All Implemented Interfaces:
    java.io.Serializable

    public class ResourceParserException
    extends java.lang.RuntimeException
    An exception that may be thrown when an error occurs while parsing a resource file. This exception generally indicates that the file contains a syntax error.
    Since:
    3.0
    Author:
    Chris Jennings
    See Also:
    ResourceParser, Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getLineNumber()
      Returns the line number of the error, if known, or 0.
      java.lang.String getLocalizedMessage()  
      java.lang.String getResourceFile()
      Returns the resource file that was being parsed, if known, or null.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ResourceParserException

        public ResourceParserException()
      • ResourceParserException

        public ResourceParserException​(java.lang.String message)
      • ResourceParserException

        public ResourceParserException​(java.lang.String resource,
                                       java.lang.String message)
      • ResourceParserException

        public ResourceParserException​(java.lang.String resource,
                                       java.lang.String message,
                                       int line)
      • ResourceParserException

        public ResourceParserException​(java.lang.String resource,
                                       java.lang.String message,
                                       EscapedLineReader reader)
    • Method Detail

      • getResourceFile

        public java.lang.String getResourceFile()
        Returns the resource file that was being parsed, if known, or null.
        Returns:
        the file containing the error
      • getLineNumber

        public int getLineNumber()
        Returns the line number of the error, if known, or 0.
        Returns:
        the line numner where parsing failed
      • getLocalizedMessage

        public java.lang.String getLocalizedMessage()
        Overrides:
        getLocalizedMessage in class java.lang.Throwable