CanteenError Class
Canteen errors are exceptions which are only visible in debug mode. These are site critical things like setup is wrong. Located in the namespace Canteen\Errors.
Constructor
Item Index
Methods
- convertToResult static
- getFormattedTrace static
- getResult
Properties
- AUTOLOAD_CLASS static
- FORM_INHERITANCE static
- INSUFFICIENT_PHP static
- INSUFFICIENT_VERSION static
- INTERNAL_ONLY static
- INVALID_CLASS static
- INVALID_DATA static
- INVALID_FORM static
- INVALID_INDEX static
- INVALID_PROPERTY static
- INVALID_SERVICE_ALIAS static
- messages static
- NO_SETTINGS static
- OVERRIDE_CONTROLLER_PROCESS static
- rootPath static
- SETTING_DELETE static
- SETTING_NAME_TAKEN static
- SETTING_WRITEABLE static
- SETTINGS_REQUIRED static
- TAKEN_SERVICE_ALIAS static
- UNKNOWN static
- WRONG_DOMAIN static
Methods
convertToResult
-
e
A utility function to convert any exception to formatted result
Parameters:
-
e
ExceptionThe exception to convert to better formatted result
Returns:
The result Exception object formatted nicely
getFormattedTrace
-
e
A utility function to formatted the exception stack trace
Parameters:
-
e
ExceptionThe exception to convert to trace
Returns:
The collection of arrays
getResult
()
Dictionary
Get the result object
Returns:
The result Exception object formatted nicely
Properties
AUTOLOAD_CLASS
Int
final
static
Duplicate named autoload class
FORM_INHERITANCE
Int
final
static
The form inheritance is wrong
INSUFFICIENT_PHP
Int
final
static
PHP version check failed
INSUFFICIENT_VERSION
Int
final
static
Canteen version is unsufficient
INTERNAL_ONLY
Int
final
static
The method being called is for internal use only
INVALID_CLASS
Int
final
static
The class doesn't exist
INVALID_DATA
Int
final
static
A particular data name is referenced but doesn exist
INVALID_FORM
Int
final
static
The form specified does not exist
INVALID_INDEX
Int
final
static
The specified site index doesn't exist
INVALID_PROPERTY
Int
final
static
Property doesn't exist on the class
INVALID_SERVICE_ALIAS
Int
final
static
Trying to access service($alias) and nothing can be created
NO_SETTINGS
Int
final
static
No settings were found for a matching domain
OVERRIDE_CONTROLLER_PROCESS
Int
final
static
Bad controller implementation
rootPath
String
static
The source directory path to Canteen folder, this is used to remove the verbose path to Canteen
SETTING_DELETE
Int
final
static
Unable to delete the setting
SETTING_NAME_TAKEN
Int
final
static
The setting name is already taken
SETTING_WRITEABLE
Int
final
static
Unable to change the setting
SETTINGS_REQUIRED
Int
final
static
The settings are required for setup
TAKEN_SERVICE_ALIAS
Int
final
static
Duplicate named service alias
UNKNOWN
Int
final
static
The label for an error that is unknown or unfound in messages
WRONG_DOMAIN
Int
final
static
Submitted from the wrong domain