Class for extended exception used in the SmartFactory library.
| Constants | |
|---|---|
|
public
|
Constant for the error code "config_error". |
|
public
|
Constant for the error code "file_write_error". |
|
public
|
Constant for the error code "invalid_content_type". |
|
public
|
Constant for the error code "invalid_request_data". |
|
public
|
Constant for the error code "json_parse_error". |
|
public
|
Constant for the error code "missing_request_data". |
|
public
|
Constant for the error code "not_found". |
|
public
|
Constant for the error code "path_access_error". |
|
public
|
Constant for the error code "system_error". |
|
public
|
Constant for the error code "xml_parse_error". |
| Properties | |
|---|---|
|
protected
|
Internal variable for storing the error. |
|
protected
|
Internal variable for storing the error details. |
|
protected
|
Internal variable for storing the error element. |
|
protected
|
Internal variable for storing the additional technical information. |
| Methods | |
|---|---|
|
public
|
Constructor. |
|
public
|
Returns the string error code of the exception. |
|
public
|
Returns the error details of the exception. |
|
public
|
Returns the error element. |
|
public
|
Returns the technical information for the error. |
|
public
|
Sets the error element. |
Constant for the error code "config_error".
Constant for the error code "file_write_error".
Constant for the error code "invalid_content_type".
Constant for the error code "invalid_request_data".
Constant for the error code "json_parse_error".
Constant for the error code "missing_request_data".
Constant for the error code "not_found".
Constant for the error code "path_access_error".
Constant for the error code "system_error".
Constant for the error code "xml_parse_error".
Internal variable for storing the error.
Internal variable for storing the error details.
The error details might be useful if the error message translations are provided on the client, not on the server, and the error message should contain some details that may vary from case to case. In that case, the servers return the error message id instead of final text and the details, the client uses the error message id, gets the final translated text and substitutes the parameters through the details.
Internal variable for storing the error element.
Internal variable for storing the additional technical information.
Constructor.
| Name | Pass type | Value type | Default value | Description |
|---|---|---|---|---|
| $message | by value | string |
Error message. |
|
| $error_code | by value | string | SmartException::ERR_CODE_SYSTEM_ERROR |
Error code. Since the error texts can be localized, the unique code of the error might be important fo using in comparison. |
| $error_element | by value | string | "" |
Error element. |
| $error_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. |
| $technical_info | by value | string | "" |
Additional technical information. It can be used if it is a programming error and displayed only if the debug mode is active. |
Returns the string error code of the exception.
Since the error texts can be localized, the unique code of the error might be important fo using in comparison.
Returns the error code.
Returns the error details of the exception.
The error details might be useful if the error message translations are provided on the client, not on the server, and the error message should contain some details that may vary from case to case. In that case, the servers return the error message id instead of final text and the details, the client uses the error message id, gets the final translated text and substitutes the parameters through the details.
Returns the error details.
Returns the error element.
Returns the error element.
Returns the technical information for the error.
Returns the technical information for the error.
Sets the error element.
| Name | Pass type | Value type | Default value | Description |
|---|---|---|---|---|
| $error_element | by value | string |
Error element. |