Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Bootstrap error handling question

 
Post new topic   Reply to topic    Infralution Support Forum Index -> .NET Encryptor Support
View previous topic :: View next topic  
Author Message
PaulS



Joined: 03 Jul 2013
Posts: 24

PostPosted: Wed Oct 29, 2014 11:45 pm    Post subject: Bootstrap error handling question Reply with quote

WinForms: A couple of users are seeing the Bootstrap Error dialog, which doesn't show as much error information as my own custom error dialogs. I did some testing and it appears that the bootstrap handles errors with it's own error dialog up until my main form's Load handler is called. Once inside Load my error handling takes over. I am wondering what is happening here. I would like to handle errors in the Main entry point, and in the ctor of the main form.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Thu Oct 30, 2014 4:10 am    Post subject: Reply with quote

The Bootstraps exception handler will handle any exception that is thrown in your application and not handled, or exceptions that are actual raised in the bootstrap itself. You can of course customize the Bootstrap error handler to display more information if required. To minimize the number of exceptions that might end up propagating out to the bootstrap you should ensure that your application defines a main method (rather than just setting a startup form in VB.NET) and the main method has an exception handler. In addition if you want your application to be able to continue after an exception has occurred then you should consider handling the Application.ThreadException event. See this link for more information:

http://stackoverflow.com/questions/337702/how-to-implement-one-catchem-all-exception-handler-with-resume
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
PaulS



Joined: 03 Jul 2013
Posts: 24

PostPosted: Thu Oct 30, 2014 3:17 pm    Post subject: Reply with quote

My mistake. I just had to remove the try-catch in the bootstrap program main (I used your demo code) and my exception handling works normally again.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> .NET Encryptor Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group