GrogHeads Forum

Grog Friends and Affiliates => General Staff Support Forum => Army Editor Tech Support => Topic started by: Mickey3D on August 29, 2018, 01:14:00 PM

Title: Catching errors
Post by: Mickey3D on August 29, 2018, 01:14:00 PM
I know the editor is in beta version and final version will be much more "bullet proof" to errors but I think it would be could to catch errors to avoid the application crashing with only a message in the events log. Indeed, some beta testers might not be very good at Windows technical "subtleties" and providing a windows with the error message ready to be saved or copied might ease their work.
Title: Re: Catching errors
Post by: Andy ONeill on September 01, 2018, 09:10:53 AM
Sorry for delay in response.
I've been focussed on something else the last few days.

Interesting point.
I'll give that some thought.

Since people seemed to be working with event logs OK my thinking was they know how to find errors so writing something dumps a file.... then they have to find that file.... a standard process is at least easily googled.

Paste the stack trace and error to the clipboard would probably be the best option.
Title: Re: Catching errors
Post by: Mickey3D on September 02, 2018, 03:22:05 PM
I was thinking to a window displaying the error message and stack trace in a text box from where it can copied.
Title: Re: Catching errors
Post by: Andy ONeill on September 03, 2018, 06:27:20 AM
I've implemented this.
I chose clipboard because the apps are fairly heavily multi threaded.
Showing a window is kind of risky.
UI controls ( and windows ) are thread sensitive.
You can't show a window from a non ui thread.
It can also be tricky to get a window to stick around when an app is in a closing down state due to an error.

What I wanted to definitely avoid is the possibility of an infinite loop of an error causing the error handler to show window... causing an error... which causes the error handler to show a window... infinite death spiral.




Title: Re: Catching errors
Post by: Mickey3D on September 07, 2018, 12:32:15 PM
Is the new editor available on the download page (date on the page is still August 20, 2018) ?
Title: Re: Catching errors
Post by: Dr D Ezra Sidran on September 11, 2018, 08:52:46 AM
There is a new build (very minor changes and one new Preferences menu option). Thanks for bringing this to my attachment. I'll upload new builds today. I was planning on working on a video tutorial today, too, which I'll add to the Fandom Wiki.