diff options
| author | Kevin J Hoerr <kjhoerr@protonmail.com> | 2017-07-08 13:58:36 -0400 |
|---|---|---|
| committer | Kevin J Hoerr <kjhoerr@protonmail.com> | 2017-07-08 13:58:36 -0400 |
| commit | 692a4a48d5f8f74a06d0b5890e31887a76a903f3 (patch) | |
| tree | 9fc39dc20be3b8a442031b85beffc7baa583143b /private/Model/Connection.php | |
| parent | 0364d790e9764d91489db21805064ceeb23e3e22 (diff) | |
| download | august-offensive-692a4a48d5f8f74a06d0b5890e31887a76a903f3.tar.gz august-offensive-692a4a48d5f8f74a06d0b5890e31887a76a903f3.tar.bz2 august-offensive-692a4a48d5f8f74a06d0b5890e31887a76a903f3.zip | |
Improve exception handling, introduce autoloading
Diffstat (limited to 'private/Model/Connection.php')
| -rw-r--r-- | private/Model/Connection.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/private/Model/Connection.php b/private/Model/Connection.php index 48cf4fb..4afa330 100644 --- a/private/Model/Connection.php +++ b/private/Model/Connection.php @@ -19,6 +19,7 @@ class Connection public function __construct () { // Establish connection to db + // breaks side-effect rule include 'creds.php'; try { @@ -34,7 +35,7 @@ class Connection } catch (\PDOException $err) { // we destroy $cred as quickly as possible $cred = null; - die(json_encode(array("Result-Type" => "ERROR", "Content" => array($err->getMessage())))); + throw $err; // throw for Controller to catch } return $this; } |
