Add error check for bad action type

This commit is contained in:
pixl 2020-07-10 03:20:25 -04:00
parent 1f3fa53721
commit d478ef3309
No known key found for this signature in database
GPG Key ID: 1866C148CD593B6E

View File

@ -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());
}
}