D
Dan Holmes
In one of the other threads it was mentioned that using return values
from methods to indicated success/failure of the method should be
replaced with throwing exceptions. Which would mean code like:
List l = object.Find(...);
if (l == null) ... //nothing returned
would be replaced with:
try{
List l = object.Find(...);
....
}
catch (NotFoundException ex)
{
}
catch (Exception ex)
{
}
Is this the preferred method? And what is the background on this?
dan
from methods to indicated success/failure of the method should be
replaced with throwing exceptions. Which would mean code like:
List l = object.Find(...);
if (l == null) ... //nothing returned
would be replaced with:
try{
List l = object.Find(...);
....
}
catch (NotFoundException ex)
{
}
catch (Exception ex)
{
}
Is this the preferred method? And what is the background on this?
dan