From c6baa75205b27391fa59d94efe6ff19b277951aa Mon Sep 17 00:00:00 2001 From: Aleksey Filippov Date: Thu, 26 Feb 2026 22:58:14 +0300 Subject: [PATCH] fix(ERP-243): catch all exceptions in TimetableService transaction rollback catch (Exception) only caught yii\db\Exception, missing InvalidArgumentException from validation/upload errors. This left orphaned timetable records with tabel=1 but no timetable_fact entry, blocking shift reopening. Co-Authored-By: Claude Opus 4.6 --- erp24/api3/core/services/TimetableService.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erp24/api3/core/services/TimetableService.php b/erp24/api3/core/services/TimetableService.php index 6449af93..953d6748 100644 --- a/erp24/api3/core/services/TimetableService.php +++ b/erp24/api3/core/services/TimetableService.php @@ -101,7 +101,7 @@ class TimetableService } $transaction->commit(); - } catch (Exception $e) { + } catch (\Throwable $e) { $transaction->rollBack(); throw $e; } @@ -222,7 +222,7 @@ class TimetableService } $transaction->commit(); - } catch (Exception $e) { + } catch (\Throwable $e) { $transaction->rollBack(); throw $e; } -- 2.39.5