in reply to Re: How to return errors from my object oriented subroutine
in thread How to return errors from my object oriented subroutine
Use exceptions when an error return value from the method call would be either inconvenient or impossible to check for.
For a constructor, typically an undef value is returned for an exceptional case. For setters or getters, throwing exceptions seem to make more sense.
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
|
|---|