Skip to content
Snippets Groups Projects
Commit e50b070d authored by Robert Lange's avatar Robert Lange Committed by Dorian Merz
Browse files

refs #19222 [finc] fix specific error messages

* unwrap BackendException to get TimeoutException
* use camelCase for systemEmail view helper in exception templates
parent cccc39ca
Branches
Tags
No related merge requests found
...@@ -74,7 +74,11 @@ class Bootstrapper extends \VuFind\Bootstrapper ...@@ -74,7 +74,11 @@ class Bootstrapper extends \VuFind\Bootstrapper
return; return;
} }
$exceptionArray = explode('\\', get_class($e->getParam('exception'))); if ($exception instanceof \VuFindSearch\Backend\Exception\BackendException && $exception->getPrevious()) {
$exception = $exception->getPrevious();
}
$exceptionArray = explode('\\', get_class($exception));
$exceptionName = end( $exceptionName = end(
$exceptionArray $exceptionArray
); );
...@@ -90,7 +94,7 @@ class Bootstrapper extends \VuFind\Bootstrapper ...@@ -90,7 +94,7 @@ class Bootstrapper extends \VuFind\Bootstrapper
$model = new \Zend\View\Model\ViewModel( $model = new \Zend\View\Model\ViewModel(
[ [
'display_exceptions' => APPLICATION_ENV == 'development', 'display_exceptions' => APPLICATION_ENV == 'development',
'exception' => $e->getParam('exception'), 'exception' => $e->getParam('exception'),
] ]
); );
$model->setTemplate($template); $model->setTemplate($template);
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<?php else: ?> <?php else: ?>
<p><?=$this->transEsc($this->message)?></p> <p><?=$this->transEsc($this->message)?></p>
<?=$this->transEsc('Please contact the Library Reference Department for assistance')?> <?=$this->transEsc('Please contact the Library Reference Department for assistance')?>
<?php $supportEmail = $this->escapeHtmlAttr($this->systememail()); ?> <?php $supportEmail = $this->escapeHtmlAttr($this->systemEmail()); ?>
<a href="mailto:<?=$supportEmail?>"><?=$supportEmail?></a> <a href="mailto:<?=$supportEmail?>"><?=$supportEmail?></a>
<?php endif; ?> <?php endif; ?>
<br/> <br/>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
?> ?>
<div class="alert alert-danger"> <div class="alert alert-danger">
<p> <p>
<?=sprintf($this->translate('error_timeout'), $this->systememail(), $this->systememail())?> <?=sprintf($this->translate('error_timeout'), $this->systemEmail(), $this->systemEmail())?>
<br/> <br/>
</p> </p>
</div> </div>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment