From: Siraaj Khandkar Date: Wed, 1 Aug 2018 20:54:49 +0000 (-0400) Subject: Log error on unexpected mute field value X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=7275500c37a60e95f83be1dbf16af33cc78474ea;p=khatus.git Log error on unexpected mute field value --- diff --git a/bin/khatus_controller b/bin/khatus_controller index c2e5d91..49195a8 100755 --- a/bin/khatus_controller +++ b/bin/khatus_controller @@ -137,7 +137,7 @@ function set_volume( mute, left, right) { } else if (mute == "yes") { db["volume"] = "X" } else { - # TODO: Log error - unexpected mute value + error("Unexpected value for 'mute' field: " mute) } } @@ -511,6 +511,10 @@ function debug(location, msg, values, sep, vals, key, payload) { } } +function error(msg) { + output_msg("ERROR", msg, "/dev/stderr") +} + function ensure_numeric(n) { return n + 0 }