aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2021-07-09 12:30:35 +0200
committerGravatar Christian Hesse <mail@eworm.de>2021-07-09 12:46:03 +0200
commitb864db1e389cb262ef35a2ee2d679c98b6ff3bbb (patch)
tree5c852ee7814ef4d8a1f30041d8e51293f32bb99c
parentf694e1e54d5264f7c442456427c501cac5bfb778 (diff)
global-functions: $ScriptInstallUpdate: add error handling for migration
-rw-r--r--global-functions6
1 files changed, 5 insertions, 1 deletions
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;
}