Add try/catch around Ebook::FromFilesystem()

This commit is contained in:
Mike Colagrosso 2024-10-22 16:37:34 -06:00 committed by Alex Cabal
parent d22bdc0099
commit 627f90c0e2

View file

@ -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");