mirror of
https://github.com/danog/amp.git
synced 2024-11-27 04:24:42 +01:00
parent
0581b38146
commit
27e7f2a05b
@ -342,10 +342,14 @@ final class Loop
|
||||
/**
|
||||
* Set a callback to be executed when an error occurs.
|
||||
*
|
||||
* The callback receives the error as the first and only parameter. The return value of the callback gets ignored.
|
||||
* If it can't handle the error, it MUST throw the error. Errors thrown by the callback or during its invocation
|
||||
* MUST be thrown into the `run` loop and stop the driver.
|
||||
*
|
||||
* Subsequent calls to this method will overwrite the previous handler.
|
||||
*
|
||||
* @param callable(\Throwable|\Exception $error)|null $callback The callback to execute; null will clear the current
|
||||
* handler.
|
||||
* @param callable(\Throwable|\Exception $error)|null $callback The callback to execute. `null` will clear the
|
||||
* current handler.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
@ -227,6 +227,10 @@ abstract class Driver
|
||||
/**
|
||||
* Set a callback to be executed when an error occurs.
|
||||
*
|
||||
* The callback receives the error as the first and only parameter. The return value of the callback gets ignored.
|
||||
* If it can't handle the error, it MUST throw the error. Errors thrown by the callback or during its invocation
|
||||
* MUST be thrown into the `run` loop and stop the driver.
|
||||
*
|
||||
* Subsequent calls to this method will overwrite the previous handler.
|
||||
*
|
||||
* @param callable(\Throwable|\Exception $error)|null $callback The callback to execute. `null` will clear the
|
||||
|
Loading…
Reference in New Issue
Block a user