ThrowUnobservedTaskExceptions
<runtime> <legacyCorruptedStateExceptionsPolicy enabled="true"/> <ThrowUnobservedTaskExceptions enabled="true"/></runtime>
static void Main(string[] param){ Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException); ......