Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re^6: Throw DB error

by Bheema_Tyco (Novice)
on Mar 04, 2010 at 04:28 UTC ( #826604=note: print w/replies, xml ) Need Help??

in reply to Re^5: Throw DB error
in thread Throw DB error

WARN_Handler and DIE_Handler are the two sub routines i have defined. Whenever db throw errors these routine will get activated. i am calling these methods using SIG { } command See bellow code

$SIG{__WARN__} = \&WARN_Handler; $SIG{__DIE__} = \&DIE_Handler;

here &WARN_Handler and &DIE_Handler are the two sub routines OK. So now tell me how to throw db error as we in JAVA or some languages.

Replies are listed 'Best First'.
Re^7: Throw DB error
by Anonymous Monk on Mar 04, 2010 at 04:44 UTC
    warn and die are perl sub routines OK, understand?

      i know that, i also know that whenever any thing goes wrong then those sub routine will be called. But the thing is as in java or .Net can i throw our own exception/error in perl

        Did you know that die is perls exception mechanism?

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://826604]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2023-06-01 22:40 GMT
Find Nodes?
    Voting Booth?

    No recent polls found