Collecting
in package
implements
ErrorHandler
Error handler that collects all errors into an array.
This allows graceful handling of errors.
Interfaces, Classes and Traits
Table of Contents
- $errors : array<string|int, Error>
- clearErrors() : mixed
- Reset/clear collected errors.
- getErrors() : array<string|int, Error>
- Get collected errors.
- handleError() : mixed
- Handle an error generated during lexing, parsing or some other operation.
- hasErrors() : bool
- Check whether there are any errors.
Properties
$errors
private
array<string|int, Error>
$errors
= []
Collected errors
Methods
clearErrors()
Reset/clear collected errors.
public
clearErrors() : mixed
Return values
mixed —getErrors()
Get collected errors.
public
getErrors() : array<string|int, Error>
Return values
array<string|int, Error> —handleError()
Handle an error generated during lexing, parsing or some other operation.
public
handleError(Error $error) : mixed
Parameters
- $error : Error
-
The error that needs to be handled
Return values
mixed —hasErrors()
Check whether there are any errors.
public
hasErrors() : bool