From: mkanat%bugzilla.org <> Date: Tue, 19 Dec 2006 14:43:10 +0000 (+0000) Subject: Bug 364250: If a hook fails, no error is available for diagnosis X-Git-Tag: bugzilla-2.23.4~150 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a32a16cafd772c918f2487423aa3317149bfff75;p=thirdparty%2Fbugzilla.git Bug 364250: If a hook fails, no error is available for diagnosis Patch By Max Kanat-Alexander r=colin, a=myk --- diff --git a/Bugzilla/Hook.pm b/Bugzilla/Hook.pm index f8167cd650..3e784bd0ed 100644 --- a/Bugzilla/Hook.pm +++ b/Bugzilla/Hook.pm @@ -44,8 +44,8 @@ sub process { if (-e $extension.'/code/'.$name.'.pl') { Bugzilla->hook_args($args); do($extension.'/code/'.$name.'.pl'); - ThrowCodeError('extension_invalid', { - name => $name, extension => $extension }) if $@; + ThrowCodeError('extension_invalid', + { errstr => $@, name => $name, extension => $extension }) if $@; } } diff --git a/template/en/default/global/code-error.html.tmpl b/template/en/default/global/code-error.html.tmpl index d48b89993e..b92fa44362 100644 --- a/template/en/default/global/code-error.html.tmpl +++ b/template/en/default/global/code-error.html.tmpl @@ -139,7 +139,7 @@ [% ELSIF error == "extension_invalid" %] An error occurred processing hook [% name FILTER html %] in - extension [% extension FILTER html %]. + extension [% extension FILTER html %]: [% errstr FILTER html %] [% ELSIF error == "extern_id_conflict" %] The external ID '[% extern_id FILTER html %]' already exists