My question actually occurs in two parts, therefore, this is an ambiguous name.
Part one
As far as I know, you should never swallow an exception. Do not even register it and forget it. In general, I try to resolve the exception and repeat the code - for example, let's say I get a FileNotFound exception.
I suggest that the user check the file and try again by offering another file selection dialog box and hoping for the best. Otherwise, trying to solve the problem, I end up notifying the user and registering an exception. I was told that this is not the right thing to do in the catch block, so am I doing it right trying to solve the problem?
I can’t think what else I have to do. I suspect that they are feeding me misinformation - I am a gullible soul.
Part two
Creating a log in my program directory to register exceptions is fine, I think, but again they tell me that exceptions should be written to the Windows event log. It's right? Under what circumstances should you write to the event log?
Stupid questions require stupid answers.
Edit: There is no context to this question other than a general vague area. My friend and I chatted about what to do in special circumstances.
source
share