From f9e7fa60396379f8f9af44d5ec9f22fab8d15826 Mon Sep 17 00:00:00 2001 From: David Maus <maus@hab.de> Date: Mon, 13 May 2013 16:20:37 +0200 Subject: [PATCH] New function: Trigger error event * VuFindSearch/Service.php (triggerError): New function. Trigger error event. --- module/VuFindSearch/src/VuFindSearch/Service.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/module/VuFindSearch/src/VuFindSearch/Service.php b/module/VuFindSearch/src/VuFindSearch/Service.php index 99bd058f218..e4d2dc11d04 100644 --- a/module/VuFindSearch/src/VuFindSearch/Service.php +++ b/module/VuFindSearch/src/VuFindSearch/Service.php @@ -267,6 +267,19 @@ class Service return $this->backends[$backend]; } + /** + * Trigger the error event. + * + * @param BackendException $exception Error exception + * @param array $args Event arguments + * + * @return void + */ + public function triggerError(BackendException $exception, $args) + { + $this->getEventManager()->trigger('error', $exception, $args); + } + /** * Trigger the pre event. * -- GitLab