From 9a5a196d79ed8692c45595c4e3d42e34571bc3a7 Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Tue, 17 Apr 2012 20:56:41 +0200 Subject: Bug 745197: Add a hook in Bugzilla::Error::_throw_error() so that extensions can control the way to throw errors r=dkl a=LpSolit --- Bugzilla/Hook.pm | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'Bugzilla/Hook.pm') diff --git a/Bugzilla/Hook.pm b/Bugzilla/Hook.pm index 8eac561c0..27184c2e4 100644 --- a/Bugzilla/Hook.pm +++ b/Bugzilla/Hook.pm @@ -687,6 +687,37 @@ Params: =back +=head2 error_catch + +This hook allows extensions to catch errors thrown by Bugzilla and +take the appropriate actions. + +Params: + +=over + +=item C + +A string representing the error code thrown by Bugzilla. This string +matches the C variable in C and +C. + +=item C + +If the error mode is set to C, you get a reference to +the whole HTML page with the error message in it, including its header and +footer. If you need to extract the error message itself, you can do it by +looking at the content of the table cell whose ID is C. +If the error mode is not set to C, you get a reference +to the error message itself. + +=item C + +This hash contains all the data passed to the error template. Its content +depends on the error thrown. + +=back + =head2 flag_end_of_update This happens at the end of L, after all other -- cgit v1.2.3-24-g4f1b