Skip to content

Commit

Permalink
Use InvalidArgumentException for missing config.
Browse files Browse the repository at this point in the history
  • Loading branch information
denpamusic committed Nov 19, 2018
1 parent 7bfcb6c commit 62a32d4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ClientFactory.php
Expand Up @@ -4,6 +4,7 @@

namespace Denpa\Bitcoin;

use InvalidArgumentException;
use Denpa\Bitcoin\LaravelClient as BitcoinClient;

class ClientFactory
Expand Down Expand Up @@ -73,7 +74,9 @@ public function getConfig(string $name = 'default') : array
}

if (! array_key_exists($name, $this->config)) {
throw new \Exception("Could not find client configuration [$name]");
throw new InvalidArgumentException(
"Could not find client configuration [$name]"
);
}

return $this->withDefaults($this->config[$name]);
Expand Down

0 comments on commit 62a32d4

Please sign in to comment.