Execution result. More...
Public Member Functions | |
utyResult ($level, $code, $description, $details, $etc=NULL) | |
isOk () | |
Public Attributes | |
$level | |
$code | |
$description | |
$details | |
$backtrace | |
$time | |
$etc |
Execution result.
Used to return detailed error information for critical functions. Usually those functions return NULL if ok or utyResult if error.
The backtrace is setted when created only if the _UTY_DEBUG lobal var is ===TRUE. if _UTY_LOG is setted and $level >= _UTY_LOG_LEVEL a log is automatically written.
NOTABENE: backtrace may contain sensitive data, so you should never set $_UTY_DEBUG=TRUE in a production enviroment
isOk | ( | ) |
utyResult | ( | $ | level, | |
$ | code, | |||
$ | description, | |||
$ | details, | |||
$ | etc = NULL | |||
) |
Create an utyResult with the specified parameters
level | (UTY_ERR_*) error level: one of the UTY_ERR_* error level defines. |
code | (string) unique error identifier | |
description | (string) international error description | |
details | (string) error details (usually native error) | |
[etc] | (mixed) xtra user data, default=NULL |
$backtrace |
(array) php debug_backtrace or NULL (depending on UTY_DEBUG value)
$code |
(string) error code (the unique error id defined by the programmer)
$description |
(string) error description (internationalized)
$details |
(string) error details (usually the native error: not internationalizable)
$etc |
(mixed) user data
$level |
(UTY_ERR_*) error level
$time |
(int) unix timestamp when instantiated
Copyright © 2010 Attilio Pavone - www.utillyty.eu