From: Marcel Werk Date: Wed, 27 Oct 2021 08:25:48 +0000 (+0200) Subject: Apply suggestions from code review X-Git-Tag: 5.5.0_Alpha_1~345^2^2~4 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5eef7144123a4b7c7a9d704647eb444281624856;p=GitHub%2FWoltLab%2FWCF.git Apply suggestions from code review Co-authored-by: Tim Düsterhus --- diff --git a/wcfsetup/install/files/lib/action/PaypalCallbackAction.class.php b/wcfsetup/install/files/lib/action/PaypalCallbackAction.class.php index 3d32d56177..db1801f2ce 100644 --- a/wcfsetup/install/files/lib/action/PaypalCallbackAction.class.php +++ b/wcfsetup/install/files/lib/action/PaypalCallbackAction.class.php @@ -49,13 +49,13 @@ class PaypalCallbackAction extends AbstractAction $response = $client->send($request); $content = (string)$response->getBody(); } catch (ClientExceptionInterface $e) { - throw new SystemException('connection to paypal.com failed: ' . $e->getMessage()); + throw new \Exception('PayPal IPN validation request failed: ' . $e->getMessage(), 0, $e); } if (\strpos($content, "VERIFIED") === false) { - throw new SystemException('request not validated'); + throw new \Exception("PayPal IPN validation did not return 'VERIFIED'."); } - } catch (SystemException $e) { + } catch (\Exception $e) { \wcf\functions\exception\logThrowable($e); return new EmptyResponse(500); } @@ -127,7 +127,7 @@ class PaypalCallbackAction extends AbstractAction } $this->executed(); - } catch (SystemException $e) { + } catch (\Exception $e) { \wcf\functions\exception\logThrowable($e); }