Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: want to skip displaying of "DBD::Oracle::st execute failed:" error messages showing full queryby boftx (Deacon) |
on Apr 07, 2015 at 17:04 UTC ( [id://1122719]=note: print w/replies, xml ) | Need Help?? |
Simply wrap your execute statement in an eval block and catch the error. (I'd say use Try::Tiny but it doesn't play nice with DBI, at least for me.) By all means keep RaiseError => 1 and PrintError => 0 for this to work. EDIT: On a side note, it is extremely poor practice (and bad security) to interpolate values directly into the SQL statement. Use placeholders instead and supply the values as params to the execute statement instead.
You must always remember that the primary goal is to drain the swamp even when you are hip-deep in alligators.
In Section
Seekers of Perl Wisdom
|
|