diff options
author | Fbenas <philbeansburton@gmail.com> | 2018-05-07 15:02:39 +0100 |
---|---|---|
committer | Fbenas <philbeansburton@gmail.com> | 2018-05-07 15:02:39 +0100 |
commit | 8350b6bd36d3a4bb3a99dfbf67e746f4f815927c (patch) | |
tree | d7cf04d2343ca031a8f241f204e4227eb6b48016 /src/Script/Output.php | |
parent | 33f00442f1667d57f94433834e0da4985670025b (diff) |
Add some simple exception handling for bad inputs
Diffstat (limited to 'src/Script/Output.php')
-rw-r--r-- | src/Script/Output.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Script/Output.php b/src/Script/Output.php index 8f7a689..e61cff8 100644 --- a/src/Script/Output.php +++ b/src/Script/Output.php @@ -3,6 +3,7 @@ namespace App\Script; use App\Model\Collection; +use Exception; class Output { @@ -20,4 +21,9 @@ class Output echo implode("\n\n", $out) . "\n"; } + + public function printException(Exception $e) + { + echo "An unexpected exception occured:\n" . $e->getMessage() . "\n"; + } } |