Keep It Simple, Stupid | |
PerlMonks |
Re^2: Use of "die" in OO modulesby sth (Priest) |
on Jan 19, 2007 at 16:21 UTC ( [id://595484]=note: print w/replies, xml ) | Need Help?? |
I recently added a ErrStr var to my modules, kinda of like the DBI::errstr. So if the object constructor fails the object is an undef and the the Errstr can be checked, i.e.
...otherwise if there is an error with a method call the error string can be retrieved, I really struggled with what was the correct way to handle the errors, I'm still not sure I like my solution.
In Section
Seekers of Perl Wisdom
|
|