|
@@ -57,15 +57,17 @@ class Handler extends ExceptionHandler
|
|
|
|
|
|
private function reportError(Throwable $e){
|
|
private function reportError(Throwable $e){
|
|
try {
|
|
try {
|
|
- $url = config('stag.backendUrl') . '/dev/reportPhpError';
|
|
|
|
- $headers['secret'] = 'superman';
|
|
|
|
- Http::asForm()
|
|
|
|
- ->withHeaders($headers)
|
|
|
|
- ->post($url, [
|
|
|
|
- 'data'=>'FE2: '.$e->getMessage(),
|
|
|
|
- 'secret' => 'superman'
|
|
|
|
- ])
|
|
|
|
- ->json();
|
|
|
|
|
|
+ if($e->getMessage()){
|
|
|
|
+ $url = config('stag.backendUrl') . '/dev/reportPhpError';
|
|
|
|
+ $headers['secret'] = 'superman';
|
|
|
|
+ Http::asForm()
|
|
|
|
+ ->withHeaders($headers)
|
|
|
|
+ ->post($url, [
|
|
|
|
+ 'data'=>'FE2: '.$e->getMessage(),
|
|
|
|
+ 'secret' => 'superman'
|
|
|
|
+ ])
|
|
|
|
+ ->json();
|
|
|
|
+ }
|
|
}catch(\Exception $e){
|
|
}catch(\Exception $e){
|
|
//do nothing
|
|
//do nothing
|
|
}
|
|
}
|