summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Error.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Error.pm')
-rw-r--r--Bugzilla/Error.pm7
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)