Class DelphiException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.juliewoolie.delphi.resource.DelphiException
- All Implemented Interfaces:
Serializable
Delphi API exception, uses error codes
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Access to file denied.static final int
Request resource is not available onApiModule
modules.static final int
Syntax error or other kind of error occurred when attempting to parse an XML document.static final int
Attempted to find module with a null/blank name.static final int
Illegal instance name used.static final int
Specified instance name is already in usestatic final int
Failed to parseResourcePath
static final int
IO Exceptionstatic final int
Failed to find enabled required plugins during document loadingstatic final int
The module directory does not existstatic final int
Resource module threw an error while accessing resourcestatic final int
Failed to find a module,getBaseMessage()
will return the name of the module it failed to find.static final int
Failed to read module.zip
filestatic final int
No such file error, error message will be the file's name.static final int
Game version too old.static final int
XML Parser failed to initializestatic final int
Data did not match a schema.static final int
Input string/file content was invalidstatic final int
Unknown error -
Constructor Summary
ConstructorsConstructorDescriptionDelphiException
(int code) DelphiException
(int code, String message) DelphiException
(int code, String message, Throwable cause) DelphiException
(int code, Throwable cause) -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
ERR_UNKNOWN
public static final int ERR_UNKNOWNUnknown error- See Also:
-
ERR_NO_FILE
public static final int ERR_NO_FILENo such file error, error message will be the file's name.Throwable.getCause()
will return the thrownNoSuchFileException
- See Also:
-
ERR_ACCESS_DENIED
public static final int ERR_ACCESS_DENIEDAccess to file denied.Throwable.getCause()
will return the thrownAccessDeniedException
- See Also:
-
ERR_IO_ERROR
public static final int ERR_IO_ERRORIO ExceptionThrowable.getCause()
will return the thrownIOException
- See Also:
-
ERR_INVALID_PATH
-
ERR_API_MODULE
public static final int ERR_API_MODULERequest resource is not available onApiModule
modules.- See Also:
-
ERR_SYNTAX
public static final int ERR_SYNTAXInput string/file content was invalid- See Also:
-
ERR_SCHEMA_ERROR
public static final int ERR_SCHEMA_ERRORData did not match a schema.Used by
ViewResources.loadItemStack(String)
if the JSON it attempted to load data from did not match minecraft's item schema.Has no
Throwable.getCause()
, instead all detail about the error is in thegetBaseMessage()
- See Also:
-
ERR_SAX_PARSER_INIT
public static final int ERR_SAX_PARSER_INITXML Parser failed to initialize- See Also:
-
ERR_DOC_PARSE
public static final int ERR_DOC_PARSESyntax error or other kind of error occurred when attempting to parse an XML document.- See Also:
-
ERR_MISSING_PLUGINS
public static final int ERR_MISSING_PLUGINSFailed to find enabled required plugins during document loading- See Also:
-
ERR_MODULE_UNKNOWN
public static final int ERR_MODULE_UNKNOWNFailed to find a module,getBaseMessage()
will return the name of the module it failed to find.- See Also:
-
ERR_MODULE_DIRECTORY_NOT_FOUND
public static final int ERR_MODULE_DIRECTORY_NOT_FOUNDThe module directory does not exist- See Also:
-
ERR_MODULE_ZIP_ACCESS_DENIED
public static final int ERR_MODULE_ZIP_ACCESS_DENIEDFailed to read module.zip
file- See Also:
-
ERR_MODULE_ERROR
public static final int ERR_MODULE_ERRORResource module threw an error while accessing resource- See Also:
-
ERR_EMPTY_MODULE_NAME
public static final int ERR_EMPTY_MODULE_NAMEAttempted to find module with a null/blank name.- See Also:
-
ERR_INSTANCE_NAME_USED
public static final int ERR_INSTANCE_NAME_USEDSpecified instance name is already in use- See Also:
-
ERR_ILLEGAL_INSTANCE_NAME
public static final int ERR_ILLEGAL_INSTANCE_NAMEIllegal instance name used.Illegal instance names:
targeted
all
- See Also:
-
ERR_OLD_GAME_VERSION
public static final int ERR_OLD_GAME_VERSIONGame version too old.Occurs when parsing a page XML file and the
Options.MINIMUM_GAME_VERSION
option requires a newer version of the game.- See Also:
-
-
Constructor Details
-
DelphiException
public DelphiException(int code) -
DelphiException
-
DelphiException
-
DelphiException
-
-
Method Details
-
getCode
public int getCode() -
getCodeString
-
getBaseMessage
-
getMessage
- Overrides:
getMessage
in classThrowable
-
codeToString
-