If you use subroutine/methods which perform simple operations then the calling code usually either ignores the error, fall back to another method ( $val= $obj->method || default) or dies quickly.
So I usually handle errors at the level just above the method/subroutine where it happens. Not quite the "detect at the lowest level and at the highest level" philosophy, I admit, but it usually works for me.
In reply to Re: Re: Re: The art of error handling
by mirod
in thread The art of error handling
by markjugg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |