diff --git a/MobiFlight/ExecutionManager.cs b/MobiFlight/ExecutionManager.cs index 5288bfe1c..a66e85b45 100644 --- a/MobiFlight/ExecutionManager.cs +++ b/MobiFlight/ExecutionManager.cs @@ -1378,11 +1378,18 @@ void mobiFlightCache_OnButtonPressed(object sender, InputEventArgs e) #if SIMCONNECT Log.Instance.log($"{msgEventLabel} => executing \"{row["description"]}\"", LogSeverity.Info); - tuple.Item1.execute( - cacheCollection, - e, - GetRefs(tuple.Item1.ConfigRefs)) - ; + try + { + tuple.Item1.execute( + cacheCollection, + e, + GetRefs(tuple.Item1.ConfigRefs)) + ; + } + catch (Exception ex) + { + Log.Instance.log($"Error excuting \"{row["description"]}\": {ex.Message}", LogSeverity.Error); + } #endif } diff --git a/MobiFlight/InputConfig/PmdgEventIdInputAction.cs b/MobiFlight/InputConfig/PmdgEventIdInputAction.cs index a99fd2f35..fb8383b5d 100644 --- a/MobiFlight/InputConfig/PmdgEventIdInputAction.cs +++ b/MobiFlight/InputConfig/PmdgEventIdInputAction.cs @@ -72,7 +72,14 @@ public override void execute( value = Replace(value, replacements); - cacheCollection.fsuipcCache.setEventID(EventId, (int) UInt32.Parse(value)); + try + { + cacheCollection.fsuipcCache.setEventID(EventId, (int)UInt32.Parse(value)); + } + catch + { + Log.Instance.log($"Unable to convert eventId {EventId} value {value} to an integer.", LogSeverity.Error); + } } public override bool Equals(object obj)