2016-12-29 14:09:49 -06:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Amp;
|
|
|
|
|
2017-01-07 13:47:45 +01:00
|
|
|
use AsyncInterop\{ Loop, Promise\ErrorHandler };
|
2016-12-29 14:09:49 -06:00
|
|
|
|
|
|
|
ErrorHandler::set(function (\Throwable $exception) {
|
|
|
|
Loop::defer(function () use ($exception) {
|
|
|
|
throw $exception;
|
|
|
|
});
|
|
|
|
});
|