From a7705060a0001ae315b2ecd1c137074eb697c6ee Mon Sep 17 00:00:00 2001 From: Gilles Crettenand Date: Thu, 21 May 2015 14:30:19 +0200 Subject: [PATCH] Raise a BookNotFoundException when the book is not found --- lib/AudioBook.php | 9 +++++++-- mobile.netbiblio.php | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/AudioBook.php b/lib/AudioBook.php index a099f4e..c624ba8 100644 --- a/lib/AudioBook.php +++ b/lib/AudioBook.php @@ -1,6 +1,11 @@ length == 0) { - throw new Exception("NotFoundException"); + throw new BookNotFoundException($code); } $row = $result->current(); diff --git a/mobile.netbiblio.php b/mobile.netbiblio.php index d7f9d24..a921356 100644 --- a/mobile.netbiblio.php +++ b/mobile.netbiblio.php @@ -7,12 +7,12 @@ */ require_once "global.php"; +require_once "mobile.webservice.php"; + require_once "lib/AudioBook.php"; require_once "lib/User.php"; require_once "lib/BookSearch.php"; -require_once "mobile.webservice.php"; - class NetBiblio extends WebService { private $data = array();