Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

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

by LanX (Sage)
on May 15, 2013 at 11:17 UTC ( #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? | Other CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2022-01-21 03:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (57 votes). Check out past polls.

    Notices?