G
Guest
Which approach is better:
1) Use a method that returns true/false (the method will log the exception
that lead to false using log4net for example)
OR
2) Use a method that returns void and throws an exception in case of failure?
If the second approach is to be suggested: Should .NET predefined
exceptions, NullReferenceException, IndexOutOfRangeException and so on, or my
own exceptions be thrown?
Thanks in advance,
Shehab.
1) Use a method that returns true/false (the method will log the exception
that lead to false using log4net for example)
OR
2) Use a method that returns void and throws an exception in case of failure?
If the second approach is to be suggested: Should .NET predefined
exceptions, NullReferenceException, IndexOutOfRangeException and so on, or my
own exceptions be thrown?
Thanks in advance,
Shehab.