\GB_Error
GeniBase Error class.
Container for checking for GeniBase errors and error messages. Return
GB_Error and use to check if this class is returned.
Many core GeniBase functions pass this class in the event of an error and
if not handled properly will result in code errors.
Synopsis
- // members
- private array $errors = ;
- private array $error_data = ;
- // methods
- public GB_Error __construct()
- public array get_error_codes()
- public string|int get_error_code()
- public array get_error_messages()
- public string get_error_message()
- public mixed get_error_data()
- public void add()
- public void add_data()
- public void remove()
Violations
Checkstyle
Line | Column | Severity | Message |
---|---|---|---|
69 | 9 | error | Inline control structures are not allowed |
74 | 9 | error | Inline control structures are not allowed |
86 | 12 | error | Method name "GB_Error::get_error_codes" is not in camel caps format |
88 | 9 | error | Inline control structures are not allowed |
102 | 12 | error | Method name "GB_Error::get_error_code" is not in camel caps format |
106 | 9 | error | Inline control structures are not allowed |
121 | 12 | error | Method name "GB_Error::get_error_messages" is not in camel caps format |
126 | 13 | error | Inline control structures are not allowed |
132 | 9 | error | Inline control structures are not allowed |
134 | 9 | error | Expected 1 space after ELSE keyword; newline found |
134 | 9 | error | Inline control structures are not allowed |
150 | 12 | error | Method name "GB_Error::get_error_message" is not in camel caps format |
152 | 9 | error | Inline control structures are not allowed |
155 | 9 | error | Inline control structures are not allowed |
169 | 12 | error | Method name "GB_Error::get_error_data" is not in camel caps format |
171 | 9 | error | Inline control structures are not allowed |
174 | 9 | error | Inline control structures are not allowed |
195 | 9 | error | Inline control structures are not allowed |
211 | 12 | error | Method name "GB_Error::add_data" is not in camel caps format |
213 | 9 | error | Inline control structures are not allowed |
Members
private
- $error_data
—
array
Stores the list of data for error codes. - $errors
—
array
Stores the list of errors.
Methods
public
- __construct() — Initialize the error.
- add() — Add an error or append additional message to an existing error.
- add_data() — Add data for error code.
- get_error_code() — Retrieve first error code available.
- get_error_codes() — Retrieve all error codes.
- get_error_data() — Retrieve error data for error code.
- get_error_message() — Get single error message.
- get_error_messages() — Retrieve all error messages or error messages matching code.
- remove() — Removes the specified error.
History
-
2017-05-16T19:52:59+00:00 (commit #fd0a296)
Author: Limych (andrey@khrolenok.ru) / Commiter: Limych (andrey@khrolenok.ru)
PSR-2 applied
-
2016-01-25T17:45:50+00:00 (commit #97e2af2)
Author: Limych (andrey@khrolenok.ru) / Commiter: Limych (andrey@khrolenok.ru)
Pre v.3.0
-
2015-03-28T21:15:41+00:00 (commit #158813e)
Author: Калёнов Денис Михайлович (a-KaDeMi-k@yandex.ru) / Commiter: Калёнов Денис Михайлович (a-KaDeMi-k@yandex.ru)
ję v2
-
2015-03-17T22:04:24+00:00 (commit #3647280)
Author: Limych (andrey@khrolenok.ru) / Commiter: Limych (andrey@khrolenok.ru)
#59: Централизованная обработка ошибок https://github.com/Limych/GeniBase/issues/issue/59