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

408
0
09-22-2023 12:22 PM
AtilaBK
Emerging Contributor

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()
        {
            FrameworkApplication.State.Deactivate(InflorConstants.InflorUserLoggedState);

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

            return base.Initialize();
        }

 static void ExceptionHandler(object sender, UnhandledExceptionEventArgs args)
        {
            Exception e = (Exception)args.ExceptionObject;
            MessageBox.Show(e.Message);
        }

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

 

0 Kudos
0 Replies