...
|
...
|
@@ -130,7 +130,17 @@ class App { |
|
|
|
|
|
}catch (\Throwable $exception){
|
|
|
|
|
|
if(!($exception instanceof Err)){
|
|
|
if($exception instanceof Err){
|
|
|
|
|
|
if ($exception->getCode() !== 200){
|
|
|
$app->data = [
|
|
|
'error_message' => $exception->getMessage(),
|
|
|
'status' => $exception->getCode() ? $exception->getCode() : 500,
|
|
|
];
|
|
|
}
|
|
|
|
|
|
}else{
|
|
|
|
|
|
$app->error = [
|
|
|
'message' => $exception->getMessage(),
|
|
|
'file' => $exception->getFile(),
|
...
|
...
|
@@ -143,11 +153,6 @@ class App { |
|
|
'error_message' => $app->debug ? $exception->getMessage().PHP_EOL.$exception->getTraceAsString() : __('server_error'),
|
|
|
'status' => $exception->getCode() ? $exception->getCode() : 500,
|
|
|
];
|
|
|
}else{
|
|
|
$app->data = [
|
|
|
'error_message' => $exception->getMessage(),
|
|
|
'status' => $exception->getCode() ? $exception->getCode() : 500,
|
|
|
];
|
|
|
}
|
|
|
|
|
|
}
|
...
|
...
|
|