Do not open ArcGIS Desktop Error Reporter and not close ArcGIS Pro

09-22-2023 12:22 PM
New Contributor II

Hi There, I'm developing some add-ins for ArcGIS Pro 3.1.3, and I'm trying to get the event that triggers the error screen regardless of where the error is being triggered and treats it so that it only displays a message without closing the application or opening the "ArcGIS Desktop Error Reporter", could anyone help me?

I have already tried that:

 protected override bool Initialize()

            AppDomain currentDomain = AppDomain.CurrentDomain;
            currentDomain.UnhandledException += new UnhandledExceptionEventHandler(ExceptionHandler);

            return base.Initialize();

 static void ExceptionHandler(object sender, UnhandledExceptionEventArgs args)
            Exception e = (Exception)args.ExceptionObject;

But after the error appears the application closes and opens "ArcGIS Desktop Error Reporter"


0 Kudos
0 Replies