diff options
author | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-07-07 23:34:25 +0200 |
---|---|---|
committer | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-07-07 23:34:25 +0200 |
commit | 87ea46f7fa2b269f065181f7765352184bb59717 (patch) | |
tree | 20e37379d319535c954480e86765a580342118bd /Bugzilla/Error.pm | |
parent | 814b24fdc9407a741967322041ff817665f8e00b (diff) | |
download | bugzilla-87ea46f7fa2b269f065181f7765352184bb59717.tar.gz bugzilla-87ea46f7fa2b269f065181f7765352184bb59717.tar.xz |
Bug 574879: Create a test that assures the correctness of Search.pm's
boolean charts
r=glob, a=mkanat
Diffstat (limited to 'Bugzilla/Error.pm')
-rw-r--r-- | Bugzilla/Error.pm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Bugzilla/Error.pm b/Bugzilla/Error.pm index 60e7837de..649fdd486 100644 --- a/Bugzilla/Error.pm +++ b/Bugzilla/Error.pm @@ -33,6 +33,7 @@ use Bugzilla::WebService::Constants; use Bugzilla::Util; use Carp; +use Data::Dumper; use Date::Format; # We cannot use $^S to detect if we are in an eval(), because mod_perl @@ -102,6 +103,12 @@ sub _throw_error { $template->process($name, $vars) || ThrowTemplateError($template->error()); } + # There are some tests that throw and catch a lot of errors, + # and calling $template->process over and over for those errors + # is too slow. So instead, we just "die" with a dump of the arguments. + elsif (Bugzilla->error_mode == ERROR_MODE_TEST) { + die Dumper($vars); + } else { my $message; $template->process($name, $vars, \$message) |