Class for extended exception collection used in the SmartFactory library. It allows to collect many errors and report them at once.
| Properties | |
|---|---|
|
protected
|
Internal variable for storing the single errors. |
| Methods | |
|---|---|
|
public
|
Stores the error to be reported. |
|
public
|
Returns the array of errors if any have been stored. |
|
public
|
Throws itself if any error has been collected. |
Internal variable for storing the single errors.
Stores the error to be reported.
| Name | Pass type | Value type | Default value | Description |
|---|---|---|---|---|
| $message | by value | string |
The error message to be reported. |
|
| $details | by value | array | [] |
The details might be useful if the message translations are provided on the client, not on the server, and the message should contain some details that may vary from case to case. In that case, the servers return the message id instead of final text and the details, the client uses the message id, gets the final translated text and substitutes the parameters through the details. |
| $related_element | by value | string | "" |
The error element associated with the error. |
| $code | by value | string | "" |
The error code to be reported. |
| $technical_info | by value | string | "" |
The technical information for the error. Displaying of this part might be controlled over an option "debug_mode". |
| $file | by value | string | "" |
The source file where the error occurred. Per default, the file where the adding error called. |
| $line | by value | string | "" |
The source file line where the error occurred. Per default, the file line where the adding error called. |
Returns the array of errors if any have been stored.
Returns the array of errors if any have been stored.
Throws itself if any error has been collected.