Improve try catch blocks
This commit is contained in:
parent
9ef598d07b
commit
dae9e6d096
1 changed files with 11 additions and 13 deletions
|
@ -61,12 +61,11 @@ class CheckoutableListener
|
||||||
Notification::route('slack', Setting::getSettings()->webhook_endpoint)
|
Notification::route('slack', Setting::getSettings()->webhook_endpoint)
|
||||||
->notify($this->getCheckoutNotification($event));
|
->notify($this->getCheckoutNotification($event));
|
||||||
}
|
}
|
||||||
} catch (Exception $e) {
|
|
||||||
if ($e instanceof ClientException){
|
|
||||||
Log::debug("Exception caught during checkout notification: ".$e->getMessage());
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
catch (ClientException $e){
|
||||||
|
Log::debug("Exception caught during checkout notification: ".$e->getMessage());
|
||||||
|
}
|
||||||
|
catch (Exception $e) {
|
||||||
Log::error("Exception caught during checkout notification: ".$e->getMessage());
|
Log::error("Exception caught during checkout notification: ".$e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -115,12 +114,11 @@ class CheckoutableListener
|
||||||
Notification::route('slack', Setting::getSettings()->webhook_endpoint)
|
Notification::route('slack', Setting::getSettings()->webhook_endpoint)
|
||||||
->notify($this->getCheckinNotification($event));
|
->notify($this->getCheckinNotification($event));
|
||||||
}
|
}
|
||||||
} catch (Exception $e) {
|
|
||||||
if ($e instanceof ClientException){
|
|
||||||
Log::debug("Exception caught during checkout notification: ".$e->getMessage());
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
catch (ClientException $e){
|
||||||
|
Log::debug("Exception caught during checkout notification: ".$e->getMessage());
|
||||||
|
}
|
||||||
|
catch (Exception $e) {
|
||||||
Log::error("Exception caught during checkin notification: ".$e->getMessage());
|
Log::error("Exception caught during checkin notification: ".$e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue