Throw exception when provider not set

This commit is contained in:
sc0Vu 2017-12-19 11:41:21 +08:00
parent 048b5a5105
commit 9efd3bc755
3 changed files with 3 additions and 3 deletions

View File

@ -365,7 +365,7 @@ class Eth
public function __call($name, $arguments)
{
if (empty($this->provider)) {
return;
throw new \RuntimeException('Please set provider first.');
}
$class = explode('\\', get_class());

View File

@ -64,7 +64,7 @@ class Net
public function __call($name, $arguments)
{
if (empty($this->provider)) {
return;
throw new \RuntimeException('Please set provider first.');
}
$class = explode('\\', get_class());

View File

@ -86,7 +86,7 @@ class Web3
public function __call($name, $arguments)
{
if (empty($this->provider)) {
return;
throw new \RuntimeException('Please set provider first.');
}
$class = explode('\\', get_class());