Skip to content

Commit

Permalink
Merge pull request #60 from augushong/patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
overtrue authored Dec 21, 2023
2 parents cf87e0f + 8d21a16 commit 5e04ac3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/QiniuAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,12 @@ public function writeStream(string $path, $contents, Config $config): void

public function read(string $path): string
{
$result = file_get_contents($this->privateDownloadUrl($path));
try {
$result = file_get_contents($this->privateDownloadUrl($path));
} catch (\Exception $th) {
throw UnableToReadFile::fromLocation($path);
}

if (false === $result) {
throw UnableToReadFile::fromLocation($path);
}
Expand Down

0 comments on commit 5e04ac3

Please sign in to comment.