Bug 364250: If a hook fails, no error is available for diagnosis

Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=colin, a=myk


git-svn-id: svn://10.0.0.236/trunk@217181 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mkanat%bugzilla.org 2006-12-19 06:43:10 +00:00
parent c7ae56b4db
commit 4f0a60e4a0
2 changed files with 3 additions and 3 deletions

View File

@ -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 $@;
}
}

View File

@ -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