public function exception(\Exception $exception) { $this->last_exception = $exception; if (is_callable($this->exception_handler)) { return call_user_func_array($this->exception_handler, [$exception, $this]); } throw $exception; }