mrteye / GDAX

API for GDAX: A service provided by Coinbase. (Unofficial API)
MIT License
19 stars 5 forks source link

Exception call is using namespace #3

Closed itsmill3rtime closed 6 years ago

itsmill3rtime commented 7 years ago

In your code you have throw new Exception which itself causes an error, need to change to throw new \Exception (add the slash) on all the places you use it. otherwise it is looking for an Exception class within the mrteye\Gdax namespace

BenMoreton commented 6 years ago

The same:

Fatal error: Uncaught Error: Class 'mrteye\Gdax\Exception' not found in /var/app/current/vendor/mrteye/gdax/src/Api.php:99 Stack trace:

0 /var/app/current/vendor/mrteye/gdax/src/Api.php(63): mrteye\Gdax\Api->_call('GET', 'accounts', '', Array)

1 /var/app/current/vendor/mrteye/gdax/src/Api.php(120): mrteye\Gdax\Api->_privateRequest('GET', 'accounts')

mrteye commented 6 years ago

Thanks. I updated the exception namespaces. They are now all preceded by a forward slash.

I also added some working examples in the test folder and shortened the timeout for curl...so we can see those exceptions in seconds rather than minutes.