$code
$code : string
TriTan CMS handles string error codes.
TriTan CMS I/O Exception Class
This extends the default LitenException
class to allow converting
file not found exceptions to and from Error
objects.
Unfortunately, because an Error
object may contain multiple messages and error
codes, only the first message for the first error code in the instance will be
accessible through the exception's methods.
__construct(string $message = 'Cannot read/write to/from specified file or director.', string $code = 403, $previous = null)
TriTan CMS exception constructor.
The class constructor accepts either the framework \Liten\Exception\LitenException
creation
parameters or an TriTan\Error
instance in place of the previous exception.
If an TriTan\Error
instance is given in this way, the $message
and $code
parameters are ignored in favour of the message and code provided by the
TriTan\Error
instance.
Depending on whether an TriTan\Error
instance was received, the instance is kept
or a new one is created from the provided parameters.
string | $message | Exception message (optional, defaults to empty). |
string | $code | Exception code (optional, defaults to empty). |
$previous |