From 87ea46f7fa2b269f065181f7765352184bb59717 Mon Sep 17 00:00:00 2001 From: Max Kanat-Alexander Date: Wed, 7 Jul 2010 14:34:25 -0700 Subject: Bug 574879: Create a test that assures the correctness of Search.pm's boolean charts r=glob, a=mkanat --- Bugzilla/Error.pm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Bugzilla/Error.pm') 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) -- cgit v1.2.3-24-g4f1b