I usually die when either the error is obviously fatal or is not supposed to happen at all (if it happens then there is a bug in the program).
Otherwise I return a false (0) or undef value. False is nicer to test than undef but it is not always possible as 0 might be a valid returned value.
If undef is also a valid returned value then I am in trouble ;--) I try to code around it though, making it an illegal result.
In reply to Re: The art of error handling
by mirod
in thread The art of error handling
by markjugg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |