Package crystalpalace.spec
Class SpecParseException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- crystalpalace.spec.SpecParseException
-
- All Implemented Interfaces:
java.io.Serializable
public class SpecParseException extends java.lang.Exception
Something went wrong while parsing a .spec file.- Author:
- Raphael Mudge
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SpecParseException(crystalpalace.spec.SpecParser p, java.lang.String _parent)
Construct a newSpecParseException
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List
getErrors()
Get the parsing errors that were discovered while parsing this file.java.lang.String
getFile()
Get the file associated with this exceptionjava.lang.String
getMessage()
Returns a generic error message string, something likeError(s) parsing [file here]
.java.lang.String
toString()
Convert this exception to a human readable string.
-
-
-
Method Detail
-
getErrors
public java.util.List getErrors()
Get the parsing errors that were discovered while parsing this file. Sometimes, there's more than one. Each entry in thisjava.util.List
is ajava.lang.String
- Returns:
- a list of errors
-
getMessage
public java.lang.String getMessage()
Returns a generic error message string, something likeError(s) parsing [file here]
. So exciting.- Overrides:
getMessage
in classjava.lang.Throwable
- Returns:
- a message associated with this exception
-
getFile
public java.lang.String getFile()
Get the file associated with this exception- Returns:
- the parent file value
-
toString
public java.lang.String toString()
Convert this exception to a human readable string. It's a multi-line string. If I were using this API, this is the method I would call. Just display this information to the user and they'll figure it out.- Overrides:
toString
in classjava.lang.Throwable
- Returns:
- the parser exception formatted nicely-ish.
-
-