diff options
author | Dave Lawrence <dlawrence@mozilla.com> | 2011-11-28 17:51:37 +0100 |
---|---|---|
committer | Dave Lawrence <dlawrence@mozilla.com> | 2011-11-28 17:51:37 +0100 |
commit | 969f20eadc0d3ca5440d69e4afbae70d66f41b57 (patch) | |
tree | b71ce564c9f8c60ba2c8870fa1e596c4a0e680c3 /whine.pl | |
parent | 0d3a92e3c8ed0b80e08a13536358d5346b8015fd (diff) | |
parent | 2fe1db36b3ced43ca9b76a5fbc293c845fd13066 (diff) | |
download | bugzilla-969f20eadc0d3ca5440d69e4afbae70d66f41b57.tar.gz bugzilla-969f20eadc0d3ca5440d69e4afbae70d66f41b57.tar.xz |
merged with bugzilla/4.2
Diffstat (limited to 'whine.pl')
-rwxr-xr-x | whine.pl | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -452,7 +452,15 @@ sub run_queries { 'params' => scalar $searchparams->Vars, 'user' => $args->{'recipient'}, # the search runs as the recipient ); - my $sqlquery = $search->sql; + # If a query fails for whatever reason, it shouldn't kill the script. + my $sqlquery = eval { $search->sql }; + if ($@) { + print STDERR get_text('whine_query_failed', { query_name => $thisquery->{'name'}, + author => $args->{'author'}, + reason => $@ }) . "\n"; + next; + } + $sth = $dbh->prepare($sqlquery); $sth->execute; |