diff --git a/src/vennv/vapm/EventLoop.php b/src/vennv/vapm/EventLoop.php index a48fdc42..39f908b8 100644 --- a/src/vennv/vapm/EventLoop.php +++ b/src/vennv/vapm/EventLoop.php @@ -197,7 +197,11 @@ protected static function run(): void } if ($fiber->isTerminated() && ($promise->getStatus() !== StatusPromise::PENDING || $promise->isJustGetResult())) { - if ($promise->isJustGetResult()) $promise->setResult($fiber->getReturn()); + try { + if ($promise->isJustGetResult()) $promise->setResult($fiber->getReturn()); + } catch (Throwable $e) { + GlobalLogger::get()->warning($e->getMessage()); + } MicroTask::addTask($id, $promise); self::removeQueue($id); }