Tpl::display(): add success event info on success hook and fix triggering it (and sentry span finish) on error
This commit is contained in:
parent
de0763c5f6
commit
3742ce7448
1 changed files with 3 additions and 1 deletions
|
@ -432,13 +432,15 @@ class Tpl {
|
|||
}
|
||||
catch (Exception $e) {
|
||||
Log :: exception($e, "Smarty - An exception occured displaying template '$template'");
|
||||
Hook :: trigger('after_displaying_template', array('success' => false));
|
||||
$sentry_span->finish();
|
||||
if ($template != 'fatal_error.tpl')
|
||||
Log :: fatal(I18n::_("An error occurred while displaying this page."));
|
||||
return;
|
||||
}
|
||||
self :: purge_errors();
|
||||
self :: purge_messages();
|
||||
Hook :: trigger('after_displaying_template');
|
||||
Hook :: trigger('after_displaying_template', array('success' => true));
|
||||
$sentry_span->finish();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue