moredetail.pl crashes when trying to view a nonexistent biblionumber. The case should be handled like it is done in detail.pl.
Created attachment 76016 [details] [review] Bug 20927: moredetail.pl crash on nonexistent biblionumber moredetail.pl crashes when trying to view a nonexistent biblionumber. The case should be handled like it is done in detail.pl.
Created attachment 76305 [details] [review] Bug 20927: moredetail.pl crash on nonexistent biblionumber moredetail.pl crashes when trying to view a nonexistent biblionumber. The case should be handled like it is done in detail.pl. Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi> Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
I would recommend to use output_and_exit_if_error (introduced by bug 18043). You can find examples on bug 20661 and bug 20351. I was waiting for these patches to get attention before continuing in this direction (and so apply the method to other modules).
Created attachment 76713 [details] [review] [17.11.x] Bug 20927: moredetail.pl crash on nonexistent biblionumber moredetail.pl crashes when trying to view a nonexistent biblionumber. The case should be handled like it is done in detail.pl. Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi> Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
(In reply to Jonathan Druart from comment #3) > I would recommend to use output_and_exit_if_error (introduced by bug 18043). > > You can find examples on bug 20661 and bug 20351. > > I was waiting for these patches to get attention before continuing in this > direction (and so apply the method to other modules). Solution is identical in detail. I saw output_and_exit_if_error somewhere recently and was not really impressed.
Ok I will provide a patch then.
Created attachment 76865 [details] [review] Bug 20927: Shortcut moredetail.pl on nonexistent biblionumber
(In reply to Marcel de Rooy from comment #5) > Solution is identical in detail. > I saw output_and_exit_if_error somewhere recently and was not really > impressed. Identical but much more changes are needed. See this counter-patch (to apply on top of bug 20661) and you will get why it's better ;)
Jonathan's counter-patch is better for more recent versions, obviously, but we're currently running off of 17.05, where output_and_exit doesn't exist, and I didn't even know about it.
Moving counterpatch to 21125 and marking the original patch for 17.11.x
RMaints: Please note that this could be pushed to 18.05 but since 18.05 includes output_and_exit_if_error, it could be done more like 21125 which is only for master ;)
It applies to 18.05; so I will just mark it as 18.05. If someone wants to provide a 18.05 specific counterpatch, you are welcome :)
Bug 21125 and Bug 20661 have both been pushed to 18.05.x for 18.05.03 release.