Skip to content

Commit

Permalink
refactor: change exception message
Browse files Browse the repository at this point in the history
  • Loading branch information
asciito committed Oct 19, 2023
1 parent 5b80fca commit 33be908
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/GoogleDownloadable.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,12 @@ public function getChromeBrowserURL(string $platform): string
$item = collect($this->browserDownloads)->first(fn (array $item) => $item['platform'] === $platform);

if (empty($item)) {
throw new \RuntimeException("The URL for the platform [$platform] you requested, it's not available");
throw new \RuntimeException("The URL for Google Chrome Browser for platform [$platform], it's not available");
}

return $item['url'];
}


/**
* @throws \RuntimeException if the required platform doesn't exist
*/
Expand All @@ -48,7 +47,7 @@ public function getChromeDriverURL(string $platform): string
$item = collect($this->driverDownloads)->first(fn (array $item) => $item['platform'] === $platform);

if (empty($item)) {
throw new \RuntimeException("The URL for the platform [$platform] you requested, it's not available");
throw new \RuntimeException("The URL for Google Chrome Driver for platform [$platform], it's not available");
}

return $item['url'];
Expand Down

0 comments on commit 33be908

Please sign in to comment.