Plex_Exception_Machine
class Plex_Exception_Machine extends Plex_ExceptionAbstract
Exception to be thrown for any problems at the machine level.
Constants
| DEFAULT_MESSAGE |
The default error message if no error message can be found. |
| DEFAULT_CODE |
The default error code if no error code can be found. |
| INVALID_EXCEPTION_TYPE_MESSAGE |
If an invalid type is thrown against an exception a higher level exception will be thrown. This message is shown in that case. |
Properties
| protected mixed[] | $validTypes | List of valid exception types for the machine exception class. |
Methods
Constructor for an exception. This makes sure the type being set up is valid, gets the code and message of the exception type and instantiates a PHP Exception object.
Makes sure the type of exception being thrown is valid for the module trying to throw the exception.
Every valid exception type should have an HTTP code with which it is associated. This method brings back said code for the given exception type.
Every valid exception type should have a message with which it is associated. This method brings back said message for the given exception type.
Module specific exceptions will have a defined set of exception types they are allowed to throw. This method will list the valid exception types for the instantiated exception class.
Details
in Plex_ExceptionAbstract at line 87
void
__construct(string $type, mixed[] $params = array())
Constructor for an exception. This makes sure the type being set up is valid, gets the code and message of the exception type and instantiates a PHP Exception object.
in Plex_ExceptionAbstract at line 119
boolean
isValidType(string $type)
Makes sure the type of exception being thrown is valid for the module trying to throw the exception.
in Plex_ExceptionAbstract at line 135
integer
getCodeForType(string $type)
Every valid exception type should have an HTTP code with which it is associated. This method brings back said code for the given exception type.
in Plex_ExceptionAbstract at line 157
string
getMessageForType(string $type, mixed[] $params = array())
Every valid exception type should have a message with which it is associated. This method brings back said message for the given exception type.
in Plex_ExceptionAbstract at line 180
mixed[]
getValidTypes()
Module specific exceptions will have a defined set of exception types they are allowed to throw. This method will list the valid exception types for the instantiated exception class.