Reputation: 896
I am using Elmah for error reporting in my applications.
Usually if there's an error I catch it, craft a custom message and throw it back again.
catch (Exception ex)
{
var e = new Exception("Failed to get Intake Statuses <br />"
+ " (@PageNumber = " + pageNumber + ", @PageSize = " + pageSize + ".<br />"
+ " Error: " + ex);
ErrorLogger.LogErrorManually(e);
throw new Exception(e.Message);
}
Now the issue arises if there is an error in the custom error that I am created.
What are the best practices to handle that? Do I create another sub Try/Catch?
Upvotes: 0
Views: 157
Reputation: 33
You can do the following:
Upvotes: 1