Package gamedata
Class ResourceParserException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- gamedata.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
-
-
Constructor Summary
Constructors Constructor Description ResourceParserException()
ResourceParserException(java.lang.String message)
ResourceParserException(java.lang.String resource, java.lang.String message)
ResourceParserException(java.lang.String resource, java.lang.String message, int line)
ResourceParserException(java.lang.String resource, java.lang.String message, EscapedLineReader reader)
-
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, ornull
.
-
-
-
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, ornull
.- 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 classjava.lang.Throwable
-
-