I ask this question because soon I will have an interview in which the main focus will be on error handling, but this is something that I did not understand, although I have almost 7 months as a junior C # developer.
As the title says, I want to know how to handle an exception form that does not have a corresponding error handler. Some time ago, I heard my colleague talk about a universal exception handler (whatever that means), which is responsible for sucking scripts. However, I did a little walk, and I could not find any information about this.
So my question is: how to deal with such exceptions and my subtext - is there something called a common exception handler?
Is something really called a general exception handler?
Yes - this is what they call a handler that logs an exception and stores as much information as possible before exiting the program. One way to create such a handler is to add an event handler for UnhandledExceptionyour object AppDomain.
UnhandledException
AppDomain
"", "" .NET, , , , . , , , "" , , .
. AppDomain.UnhandeledException, , , e.t.c.
, , .
, , , , - , , , . , , , ASP.NET, ( "" , ).
- . ( ).
A "general" exception handler will be catch (Exception ex). In other words, a trick. This is not an official term, but what a person had in mind.
catch (Exception ex)