From d478ef33094fde27cb70109d016706a6e2dc07af Mon Sep 17 00:00:00 2001 From: pixl Date: Fri, 10 Jul 2020 03:20:25 -0400 Subject: [PATCH] Add error check for bad action type --- src/logid/features/RemapButton.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/logid/features/RemapButton.cpp b/src/logid/features/RemapButton.cpp index 58aa786..b28d091 100644 --- a/src/logid/features/RemapButton.cpp +++ b/src/logid/features/RemapButton.cpp @@ -171,6 +171,9 @@ void RemapButton::Config::_parseButton(libconfig::Setting &setting) } catch(libconfig::SettingNotFoundException& e) { logPrintf(WARN, "Line %d: action is required, ignoring.", setting.getSourceLine()); + } catch(InvalidAction& e) { + logPrintf(WARN, "Line %d: %s is not a valid action, ignoring.", + setting["action"].getSourceLine(), e.what()); } }