Collecting
in package
implements
ErrorHandler
Error handler that collects all errors into an array.
This allows graceful handling of errors.
Table of Contents
Interfaces
Properties
Methods
- clearErrors() : void
- Reset/clear collected errors.
- getErrors() : array<string|int, Error>
- Get collected errors.
- handleError() : void
- 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() : void
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) : void
Parameters
- $error : Error
-
The error that needs to be handled
hasErrors()
Check whether there are any errors.
public
hasErrors() : bool