From: Aleksey Filippov Date: Thu, 26 Feb 2026 19:58:14 +0000 (+0300) Subject: fix(ERP-243): catch all exceptions in TimetableService transaction rollback X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=c6baa75205b27391fa59d94efe6ff19b277951aa;p=erp24_rep%2Fyii-erp24%2F.git 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 --- 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; }