|
|
|
@ -75,8 +75,8 @@ class Handler extends ExceptionHandler |
|
|
|
'status' => 500, |
|
|
|
]); |
|
|
|
} |
|
|
|
//TypeError && ParseError
|
|
|
|
if ($e instanceof \TypeError || $e instanceof \ParseError) { |
|
|
|
//TypeError && ParseError && Exception
|
|
|
|
if ($e instanceof \TypeError || $e instanceof \ParseError || $e instanceof \Exception) { |
|
|
|
return response()->json([ |
|
|
|
'code' => -1, |
|
|
|
'msg' => $e->getMessage(), |
|
|
|
@ -87,15 +87,6 @@ class Handler extends ExceptionHandler |
|
|
|
]); |
|
|
|
} |
|
|
|
//Exception
|
|
|
|
if ($e instanceof \Exception) { |
|
|
|
return response()->json([ |
|
|
|
'code' => -1, |
|
|
|
'msg' => $e->getMessage(), |
|
|
|
'data' => [], |
|
|
|
'status' => 500, |
|
|
|
]); |
|
|
|
} |
|
|
|
//Exception
|
|
|
|
if ($e instanceof \Error) { |
|
|
|
return response()->json([ |
|
|
|
'code' => -1, |
|
|
|
|