4
Answers

Class Library Exception Handling

Ask a question
kevin

kevin

16y
30.7k
1
I have been reading up on exception handling best practices.  I'm not sure exactly what is the best way to handle exceptions in the class library.  For example, you have a class library with a method that calls private method that updates data in a SQL database so you would normally use a try/catch/finally block to catch the exception if one occurs (very likely).  My question is what would the best way to be to handle the exception like re throwing it again with just throw or log the error in a file and return false (bool return method) with a friendly error message? I just want to do it the best way possible.

Answers (4)