From ceaa83b83edb069ecf1cca181ec461519f0cc020 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 26 Feb 2020 14:19:54 +0100 Subject: global-functions: merge $LogAnd{Error,Put} to $LogPrintExit ... ... and fix logging. Logging with severity from variable (:log $severity ...) is not possible, this is considered a syntax error. Also the 'workaround' with parsing code failed with missing message in log. The reliable code is a lot longer, so merge the two functions to save a lot of duplicate code. --- sms-action | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sms-action') diff --git a/sms-action b/sms-action index ceb9071..4442baf 100644 --- a/sms-action +++ b/sms-action @@ -6,12 +6,12 @@ :global SmsAction; -:global LogAndError; +:global LogPrintExit; :local Action $action; :if ([ :typeof $Action ] = "nothing") do={ - $LogAndError error "This script is supposed to run from SMS hook with action=..."; + $LogPrintExit error "This script is supposed to run from SMS hook with action=..." true; } :local Code ($SmsAction->$Action); -- cgit v1.2.3-54-g00ecf