transform exception during file read to sabre exceptions
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
7a3ce073da
commit
e6a7ddc1c6
|
@ -332,7 +332,11 @@ class File extends Node implements IFile {
|
|||
// do a if the file did not exist
|
||||
throw new NotFound();
|
||||
}
|
||||
$res = $this->fileView->fopen(ltrim($this->path, '/'), 'rb');
|
||||
try {
|
||||
$res = $this->fileView->fopen(ltrim($this->path, '/'), 'rb');
|
||||
} catch (\Exception $e) {
|
||||
$this->convertToSabreException($e);
|
||||
}
|
||||
if ($res === false) {
|
||||
throw new ServiceUnavailable("Could not open file");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue