throw error if failed disconnect customer

This commit is contained in:
iBNu Maksum
2025-03-17 14:50:56 +07:00
parent c63545d33a
commit 20916b44f0

View File

@ -75,13 +75,7 @@ foreach ($d as $ds) {
if ($_app_stage != 'demo') {
if (file_exists($dvc)) {
require_once $dvc;
try {
(new $p['device'])->remove_customer($c, $p);
} catch (Throwable $e) {
_log($e->getMessage());
sendTelegram($e->getMessage());
echo "Error: " . $e->getMessage() . "\n";
}
(new $p['device'])->remove_customer($c, $p);
} else {
throw new Exception("Cron error: Devices " . $p['device'] . "not found, cannot disconnect ".$c['username']."\n");
}