Asked By
Davis Avon
20 points
N/A
Posted on - 09/18/2012
Have questions about the query, there has been unhandled exception encountered, the question is why even though it is showing the Abort, ignore, and retry dialog, it also displays a complete description of the error?
While we are using the version to make production, we usually only inform us there is application failure and show them the log.
Application Error
Unhandled Exception:
Invalid operation.
System.InvalidOperationException
Query regarding exceptions in c sharp
Hello,
Whenever you get an unhandled exception is received a dialog box appears displaying the error description and giving three options such as abort, retry, ignore. Abort is to suspend the process immediately. Retry is to repeat the process from starting. Ignore is to ignore the error and continue with the process. These errors have these three options in order to select what user wishes.
Thank you.
Query regarding exceptions in c sharp
If you haven’t handled the programming exceptions properly you could see the above screen whenever a exception occur in the program. Best way to handle the exception is always write your code within a try catch block. So that you could provide any custom message with in the catch block so that the user will not see the ugly error message generated by the system instead user will see a friendly message, Rest is up to you to find the error and correct it.
You could use your own error log to log the errors. Writing to this error log can also be done within the catch block. You may download the sample try catch block code that attached below.