改名
This commit is contained in:
@@ -287,7 +287,7 @@ class Node extends HttpService
|
||||
return [$reflect->newInstance(), $action];
|
||||
} catch (Throwable $exception) {
|
||||
$this->_error = $exception->getMessage();
|
||||
$this->error($exception, 'router');
|
||||
$this->addError($exception, 'router');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -592,7 +592,7 @@ class Node extends HttpService
|
||||
}
|
||||
return $this->runWith(...func_get_args());
|
||||
} catch (Throwable $throwable) {
|
||||
$this->error($throwable->getMessage());
|
||||
$this->addError($throwable->getMessage(),'throwable');
|
||||
return Json::to(401, $throwable->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ class Reduce
|
||||
}
|
||||
return $pipe->onHandler($request, $passable);
|
||||
} catch (\Throwable $throwable) {
|
||||
logger()->addError($throwable, 'throwable');
|
||||
return Json::to(0, $throwable);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -515,7 +515,7 @@ class Router extends HttpService implements RouterInterface
|
||||
}
|
||||
return $node->afterDispatch($response);
|
||||
} catch (\Throwable $exception) {
|
||||
$this->addError($exception);
|
||||
$this->addError($exception,'throwable');
|
||||
|
||||
$Code = $exception->getCode() == 0 ? 500 : $exception->getCode();
|
||||
|
||||
@@ -659,7 +659,7 @@ class Router extends HttpService implements RouterInterface
|
||||
$router = $this;
|
||||
include_once "{$files}";
|
||||
} catch (\Throwable $exception) {
|
||||
$this->error($exception);
|
||||
$this->addError($exception,'throwable');
|
||||
} finally {
|
||||
if (isset($exception)) {
|
||||
unset($exception);
|
||||
|
||||
Reference in New Issue
Block a user