Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re^2: Request for comments - Proc::UID

by pjf (Curate)
on Jun 08, 2004 at 01:17 UTC ( #362174=note: print w/replies, xml ) Need Help??

in reply to Re: Request for comments - Proc::UID
in thread Request for comments - Proc::UID

Thank-you for the encouraging feedback. It's very much appreciated.

My view on exceptions versus return values is that they provide the same information, but with different default actions:

  • When communicating success or failure using a return value, the 'default action' is to ignore the failure.
  • When communicating success or failure using exceptions, the 'default action' is to abort the program.

We commonly convert between return values and exceptions, with eval {} and or die "..." being the most commonly seen transformations.

Given that any manipulation of privileges implies that work is being done in a security sensitive context, I feel that the only sensible course of action is to throw an exception should an operation fail. A program that wishes to handle such an event can easily catch the exception and do so.

The croaks in the XS code definitely need to be standardised to more easily allow for exception handling to occur, and it's my intention to have this done and the exceptions well documented before the module is released in a more stable form.

Many thanks again for the feedback,

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://362174]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2018-03-24 08:05 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (297 votes). Check out past polls.