When an attachment fails to load, it shouldn't destroy the whole layout by XRevan86

This commit is contained in:
Diogo Cordeiro 2019-04-25 20:46:31 +01:00
parent 8a07edec5f
commit bf7f17474d

View File

@ -81,7 +81,12 @@ class AttachmentListItem extends Widget
function show() function show()
{ {
$this->showStart(); $this->showStart();
try {
$this->showNoticeAttachment(); $this->showNoticeAttachment();
} catch (Exception $e) {
$this->element('div', ['class'=>'error'], $e->getMessage());
common_debug($e->getMessage());
}
$this->showEnd(); $this->showEnd();
} }