Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re^2: Throw DB error

by Bheema_Tyco (Novice)
on Mar 03, 2010 at 05:51 UTC ( #826343=note: print w/replies, xml ) Need Help??

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

Thanks for your Ans But the thing i don't wants to change my SQL query. Because for extent it should work and then it should throw db error. So how should i throw db error intentionally

By Bheema

Replies are listed 'Best First'.
Re^3: Throw DB error
by mje (Curate) on Mar 03, 2010 at 11:21 UTC

    If you don't want to change your SQL then you will have to create a problem at the database end by ensuring some of your SQL fails - e.g., manually create a row which will cause a constraint to fail in your SQL, delete a key, change permissions etc. The possibilities are endless so I'm not listing all I can think of here.

      I am sorry again i am disturbing YOU. i don't want to change either in sql query or deleting rows. I am asking that, is there any mechanism in perl that a person can throw error intentionally. Because i am using

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

      And i also written code for handle error using WARN_HANDLER AND DIE_HANDLER

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (1)
As of 2023-06-07 20:14 GMT
Find Nodes?
    Voting Booth?
    How often do you go to conferences?

    Results (29 votes). Check out past polls.