C
codymanix
Is it bad style if I have a method that returns (not throw!) an exception?
It depends on the circumstances wheather I want to throw an exception or
just want to test the consistency of the data. since the my exception class
already holds all data about the problem i would just make a method like
this:
PositionIncompleteException TestComplete()
{
if (!Complete)
return new PositionIncompleteException (posID, errorString);
else
return null;
}
It depends on the circumstances wheather I want to throw an exception or
just want to test the consistency of the data. since the my exception class
already holds all data about the problem i would just make a method like
this:
PositionIncompleteException TestComplete()
{
if (!Complete)
return new PositionIncompleteException (posID, errorString);
else
return null;
}