Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: Throw DB error

by Bheema_Tyco (Novice)
on Mar 03, 2010 at 05:51 UTC ( [id://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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2024-04-26 01:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found