c# - To handle exception with every form or just at main -


I have a question about handling exceptions, I have a Winform that is available on every form for data retrieval and processing Uses a webservice proxy. Here's where I was really confused and there was a lot of time to decide which one is better.

Try displaying error messages for each call in a web service and allow the user to redo the process by clicking on the button again.

B Since an error occurred on the web service and the error could possibly be because the web service was unavailable, just try the generic efforts in the WinMain function in the programm and show an error message that the web service is not accessible before the application closes.

The main argument in this is that A is more user-friendly, but many attempts to catch code are needed. B code is easy, but only the application ends. I am leaning on A but I am trying to do a pure search with the options to reduce the code needed to write it to try. Any ideas?

Understand the website call and try / block block within a class =)


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -