Why Not catching Exception for simconnect.TransmitClientEvent

Why am I Not catching the Exception for simconnect.TransmitClientEvent WHEN I close the MSFS?

try
{
simconnect.TransmitClientEvent(0, cmd, Param, …
}
catch (Exception e)
{
//report err and message
}

If I forget to close my simconnect application (C#) and then go to the main menu in MSFS , my app crashes at the simconnect.TransmitClientMessage statement?

I’m not at my computer currently. There is a SimVar that you can look at to see if the user has gone back to the menu. I know the initials of the SimVar are PIPS. I abbreviated it in my code, as such.

Something like PARK_IN_PLACE_SOMPIN. Hopefully, that helps you out.

1 Like