1
0
mirror of https://github.com/beestat/app.git synced 2025-05-24 02:14:03 -04:00

Improved some exception handling.

This commit is contained in:
Jon Ziebell 2023-05-12 07:46:29 -04:00
parent 18429dd8ac
commit c5c53c33b4
4 changed files with 6 additions and 6 deletions

View File

@ -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());
}
}

View File

@ -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());
}
}

View File

@ -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());
}
}

View File

@ -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;
}