From d433a4dc3d18c68ed579c5c720465060602283b2 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 9 Feb 2018 16:57:01 -0300 Subject: [PATCH] Bug 18403: Add POD for output_and_exit_if_error Signed-off-by: Jonathan Druart --- C4/Output.pm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/C4/Output.pm b/C4/Output.pm index 58bd75a690..c605739f71 100644 --- a/C4/Output.pm +++ b/C4/Output.pm @@ -307,6 +307,21 @@ sub is_ajax { return ( $x_req and $x_req =~ /XMLHttpRequest/i ) ? 1 : 0; } +=item + + output_and_exit_if_error( $query, $cookie, $template, $params ); + +To executed at the beginning of scripts to stop the script at this point if +some errors are found. + +Tests for module 'members': +* patron is not defined (we are looking for a patron that does no longer exist/never existed) +* The logged in user cannot see patron's infos (feature 'cannot_see_patron_infos') + +Others will be added here depending on the needs (for instance biblio does not exist will be useful). + +=cut + sub output_and_exit_if_error { my ( $query, $cookie, $template, $params ) = @_; my $error; -- 2.39.5