mirror of
https://github.com/standardebooks/web.git
synced 2025-07-08 15:50:29 -04:00
Don't crash the whole catalog if one book doesn't parse correctly
This commit is contained in:
parent
876234ef9c
commit
f8da23ab9d
1 changed files with 7 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue