Skip to content

Commit 5e04ac3

Browse files
authored
Merge pull request #60 from augushong/patch-1
2 parents cf87e0f + 8d21a16 commit 5e04ac3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/QiniuAdapter.php

+6-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,12 @@ public function writeStream(string $path, $contents, Config $config): void
8080

8181
public function read(string $path): string
8282
{
83-
$result = file_get_contents($this->privateDownloadUrl($path));
83+
try {
84+
$result = file_get_contents($this->privateDownloadUrl($path));
85+
} catch (\Exception $th) {
86+
throw UnableToReadFile::fromLocation($path);
87+
}
88+
8489
if (false === $result) {
8590
throw UnableToReadFile::fromLocation($path);
8691
}

0 commit comments

Comments
 (0)