... AppDomain.CurrentDomain.FirstChanceException += HandleUnhandledException; ... public static bool inCatchAllLoop = false; public static void HandleUnhandledException(object sender, object e) { if (!inCatchAllLoop) { inCatchAllLoop = true; var finalStr = ""; if (e is UnhandledExceptionEventAr gs) finalStr = ((UnhandledExceptio nEventArgs)e).ExceptionObject.ToString(); else if (e is System.Runtime.Excep tionServices.FirstChanceExceptionEventArgs) finalStr = ((System.Runtime.Ex ceptionServices.FirstChanceExceptionEventArgs)e).E xception.ToString(); else finalStr = e.ToString(); try{ System.IO.File.Append("..myTempFile", finalStr ); } catch(Exception ex2){ } inCatchAllLoop = false; } }
There has been tons of unhandled exceptions cought (though, 90% of them were just same error repeated 100's of times, like "coulndt find file Ninjatrader.Gui.Serializers... etc." )
Could you debug NT app and fix all unhandled exceptions that live within NT (without other addons being a reason).
Comment