3 ms·
Think the point i to handle errors wherever they're best handled. Sometimes that means returning it and sometimes it means handling it right away. I've written
by gizzlon 12y ago
Think the point i to handle errors wherever they're best handled. Sometimes that means returning it and sometimes it means handling it right away.
I've written code with this style of error-handling in Perl 5, and I think it works quite well. I like having "custom" error-handling that fits the style and the purpose of that particular program, instead of trying to to fit a general pattern onto all programs. It also means you can start out with something very crude, and improve it as you go along and learn more about the failure modes etc.