Class \Scrivo\SystemException
Class to represent an error raised due failure in Scrivo program logic.
This class is for runtime errors of a technical nature that should normaly not occur in script execution, with script termination as most the likely course of action. For instance:
- Division by zero where there was no user input.
- Illegal argument types.
- Index out of bounds.
You can use these errors to discriminate between resource exceptions, system exceptions and application exceptions to take appropriate action: f.i. notify the system admin, send out bug report or prompt the user for new input.
Extends
\Exception .
Defined in:
SystemException.php.
Attr. | Name / Description |
---|---|
public |
SystemException($messageOrException, $code, $previous) Construct a \Scrivo\SystemException. |
Constructor
- public SystemException(\Exception $messageOrException=null, int $code=null, \Exception $previous=null)
-
Construct a \Scrivo\SystemException.
It is possible to create a \Scrivo\SystemException based upon an existing exception:
.... } catch (\InvalidArgumentException $e) { trhow \Scrivo\SystemException($e); }
or use the standard exception parameters:
.... } catch (\InvalidArgumentException $e) { trhow \Scrivo\SystemException("Message", 123, $e); }
Parameters:
Type Name Def. Description \Exception $messageOrException null The error message or original exception.
int $code null Optional exception code if the first parameter was an error string, else not applicable.
\Exception $previous null Optional, the original exception if the first parameter was an error string, else not applicable.
View source: SystemException.php line 79.
Documentation generated by phpDocumentor 2.0.0a12 and ScrivoDocumentor on August 29, 2013