mirror of
https://github.com/standardebooks/web.git
synced 2025-07-15 02:46:46 -04:00
Add try/catch around Ebook::FromFilesystem()
This commit is contained in:
parent
d22bdc0099
commit
627f90c0e2
1 changed files with 8 additions and 1 deletions
|
@ -23,7 +23,14 @@ if($verbose){
|
|||
print("ebookWwwFilesystemPath: $ebookWwwFilesystemPath\n");
|
||||
}
|
||||
|
||||
try{
|
||||
$ebook = Ebook::FromFilesystem($ebookWwwFilesystemPath);
|
||||
}
|
||||
catch(Exceptions\AppException $appException){
|
||||
print("An AppException occurred when updating the ebook database:\n");
|
||||
print("\t" . get_class($appException) . ": " . $appException->getMessage() . "\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if($verbose){
|
||||
print("Title: $ebook->Title\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue