log exception and continue

This commit is contained in:
2023-06-05 18:55:20 +10:00
parent 8990006d4c
commit 584e0903c8

View File

@@ -558,8 +558,8 @@ class Media extends Model
try {
static::$storageFileListCache[$disk] = Storage::disk($disk)->allFiles();
} catch (\Exception $e) {
Log::error($e->getMessage());
throw new \Exception("Cannot get a file list for storage device '$disk'");
Log::error("Cannot get a file list for storage device '$disk'. Error: " . $e->getMessage());
continue;
}
}
}