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

Re: How to catch SQL::Parser errors in Perl

by LanX (Saint)
on May 15, 2013 at 11:17 UTC ( [id://1033665]=note: print w/replies, xml ) Need Help??


in reply to How to catch SQL::Parser errors in Perl

Either you catch errors with block eval {} or you locally manipulate the %SIG handlers.

(click Search to see older threads=)

See documentation in perlvar: %SIG and eval BLOCK

Cheers Rolf

( addicted to the Perl Programming Language)

Replies are listed 'Best First'.
Re^2: How to catch SQL::Parser errors in Perl
by som.nitk (Novice) on May 15, 2013 at 11:44 UTC
    Tried this but it still shows the Defaut msgs from Parser.pm : Incomplete SET clause! at ./post_fjs_audit.pl line 173
    +173 my $result = eval { $parser->parse($statement) }; +174 unless($result) { +175 print "Caught!\n"; +177 }
    Incomplete SET clause! at ./post_fjs_audit.pl line 173 Caught!
    Any way to suppress these default msgs from Parser.pm ? One more problem is that the program exits on the caught exception. What if there are statements below to process. I dont want the program to exit.

Log In?
Username:
Password:

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

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

    No recent polls found