diff --git a/lib/Library.php b/lib/Library.php index 260b1d73..3fe2447e 100644 --- a/lib/Library.php +++ b/lib/Library.php @@ -112,8 +112,13 @@ class Library{ $ebook = apcu_fetch('ebook-' . $ebookWwwFilesystemPath); } catch(Safe\Exceptions\ApcuException $ex){ - $ebook = new Ebook($ebookWwwFilesystemPath); - apcu_store('ebook-' . $ebookWwwFilesystemPath, $ebook); + try{ + $ebook = new Ebook($ebookWwwFilesystemPath); + apcu_store('ebook-' . $ebookWwwFilesystemPath, $ebook); + } + catch(InvalidEbookException $ieEx){ + // Do nothing if one specific ebook is causing problems + } } $ebooks[] = $ebook;