aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2024-03-27 07:43:32 +0100
committerGravatar Christian Hesse <mail@eworm.de>2024-03-27 08:32:49 +0100
commit43ecec854fccb27bdf4424d684f72519f75e0484 (patch)
tree037daffc10d1147cc6505409b05af49ae82a7567
parentbd2301a28cf34bb0302487719a82a40cd64fa4ef (diff)
global-functions: $LogPrintOnce: detect and warn on possible crash
-rw-r--r--global-functions.rsc5
1 files changed, 5 insertions, 0 deletions
diff --git a/global-functions.rsc b/global-functions.rsc
index 59ba039..b3d8719 100644
--- a/global-functions.rsc
+++ b/global-functions.rsc
@@ -737,6 +737,11 @@
:return false;
}
+ :if ([ :len [ /log/find where message=($Name . ": " . $Message) ] ] > 0) do={
+ $LogPrint warning $0 \
+ ("The message is already in log, scripting subsystem may have crashed before!");
+ }
+
:set ($LogPrintOnceMessages->$Message) 1;
$LogPrint $Severity $Name $Message;
:return true;