From b864db1e389cb262ef35a2ee2d679c98b6ff3bbb Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 9 Jul 2021 12:30:35 +0200 Subject: global-functions: $ScriptInstallUpdate: add error handling for migration --- global-functions | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'global-functions') diff --git a/global-functions b/global-functions index 2e393cb..ad489a9 100644 --- a/global-functions +++ b/global-functions @@ -852,7 +852,11 @@ :if ([ :typeof $Migration ] = "str") do={ :if ([ $ValidateSyntax $Migration ] = true) do={ $LogPrintExit2 info $0 ("Applying migration for change " . $I . ": " . $Migration) false; - [ :parse $Migration ]; + :do { + [ :parse $Migration ]; + } on-error={ + $LogPrintExit2 warning $0 ("Migration code for change " . $I . " failed to run!") false; + } } else={ $LogPrintExit2 warning $0 ("Migration code for change " . $I . " failed syntax validation!") false; } -- cgit v1.2.3-70-g09d2