diff --git a/api/ecobee_sensor.php b/api/ecobee_sensor.php index 84a4522..2800c17 100644 --- a/api/ecobee_sensor.php +++ b/api/ecobee_sensor.php @@ -219,10 +219,10 @@ class ecobee_sensor extends cora\crud { ] ); } else { - throw $e; + throw new cora\exception($e->getMessage(), $e->getCode(), $e->getReportable(), $e->getExtraInfo(), $e->getRollback()); } } else { - throw $e; + throw new cora\exception($e->getMessage(), $e->getCode(), $e->getReportable(), $e->getExtraInfo(), $e->getRollback()); } } diff --git a/api/ecobee_thermostat.php b/api/ecobee_thermostat.php index a817d65..a211ae6 100644 --- a/api/ecobee_thermostat.php +++ b/api/ecobee_thermostat.php @@ -182,10 +182,10 @@ class ecobee_thermostat extends cora\crud { ] ); } else { - throw $e; + throw new cora\exception($e->getMessage(), $e->getCode(), $e->getReportable(), $e->getExtraInfo(), $e->getRollback()); } } else { - throw $e; + throw new cora\exception($e->getMessage(), $e->getCode(), $e->getReportable(), $e->getExtraInfo(), $e->getRollback()); } } diff --git a/api/runtime.php b/api/runtime.php index c48b07d..ac9da3e 100644 --- a/api/runtime.php +++ b/api/runtime.php @@ -406,7 +406,7 @@ class runtime extends cora\api { strtotime('+1 hour', $end) ); } else { - throw $e; + throw new cora\exception($e->getMessage(), $e->getCode(), $e->getReportable(), $e->getExtraInfo(), $e->getRollback()); } } diff --git a/api/thermostat.php b/api/thermostat.php index 807f205..da716a9 100644 --- a/api/thermostat.php +++ b/api/thermostat.php @@ -172,7 +172,7 @@ class thermostat extends cora\crud { return true; } catch(cora\exception $e) { if($e->getCode() === 10511) { - throw $e; + throw new cora\exception($e->getMessage(), $e->getCode(), $e->getReportable(), $e->getExtraInfo(), $e->getRollback()); } else { return false; }