Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
No Overload takes 5 arguments
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 4.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01583574
Message ID:
01583795
Views:
30
>>I think the catch comment is probably badly worded. If the exception could truly be handled then re-throwing would be unnecessary. If it's only partially handled (eg logging or notifying the user) but is not recoverable then throwing to a higher level makes sense....
>
>But wouldn't you end up logging the error twice (assuming you have an error handler in the method above the one that had an exception, which you should, right?)

Yes. Maybe logging wasn't a good example. But sometimes there is more information available for logging when the initial exception is thrown (local values, etc.) - the alternative is to create a custom exception to retain those values and throw that. The latter is probably more 'correct' - but more work :-}
Previous
Reply
Map
View

Click here to load this message in the networking platform