Skip to content

Commit

Permalink
Combine catch.
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone committed Jul 30, 2018
1 parent 36a5852 commit 59dd1b7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,7 @@ protected function getFromStorage(string $key, $duration, callable $callback)

try {
return $this->storage->remember($key, $duration, $callback);
} catch (Exception $e) {
$this->storage->forget($key);
} catch (Throwable $e) {
} catch (Exception | Throwable $e) {
$this->storage->forget($key);
}

Expand Down

0 comments on commit 59dd1b7

Please sign in to comment.