Bug 23846: Handle exception gracefully at the OPAC

I do not think we should have the same trick as the intranet, and
display a message. This should be enough.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit cce358f9af)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Jonathan Druart 2019-11-12 18:18:23 +01:00 committed by Fridolin Somers
parent 37e997a9a7
commit 828a9ecd29
3 changed files with 5 additions and 2 deletions

View File

@ -67,7 +67,7 @@
[% IF decoding_error %]
<div>
There is an error with this bibliographic record, the view may be degraded.
<br/> Error: [% decoding_error %]
<br/> Error: [% decoding_error | html %]
</div>
[% END %]
[% IF ( ocoins ) %]

View File

@ -154,4 +154,5 @@ Catch data inconsistencies in Koha database
then items.itype must be set else biblioitems.itemtype must be set
* Item types defined in items or biblioitems must be defined in the itemtypes table
* Invalid MARCXML in bibliographic records
=cut

View File

@ -846,8 +846,10 @@ $template->param(
content_identifier_exists => $content_identifier_exists,
);
# Catch the exception as Koha::Biblio::Metadata->record can explode if the MARCXML is invalid
# COinS format FIXME: for books Only
$template->param( ocoins => $biblio->get_coins );
my $coins = eval { $biblio->get_coins };
$template->param( ocoins => $coins );
my ( $loggedincommenter, $reviews );
if ( C4::Context->preference('reviewson') ) {