From 02a964696458e5583c7b34355d4680148b538e1b Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Fri, 15 Apr 2022 20:05:14 -0600 Subject: [PATCH] Show error message if in debug mode --- lib/Tracking_EasyPost.lib.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Tracking_EasyPost.lib.php b/lib/Tracking_EasyPost.lib.php index f847ff9..2a65d49 100644 --- a/lib/Tracking_EasyPost.lib.php +++ b/lib/Tracking_EasyPost.lib.php @@ -26,6 +26,10 @@ class Tracking_EasyPost { )); } } catch (Exception $ex) { + if (env("debugmode", false)) { + echo $ex->getMessage(); + echo $ex->getTraceAsString(); + } throw new TrackingException("There was a server problem. This code cannot be tracked right now."); }