Skip to content

Commit

Permalink
Split errors to individual files for PSR4 and ccxt.php loader
Browse files Browse the repository at this point in the history
  • Loading branch information
kornrunner committed Dec 17, 2017
1 parent c5c0bf5 commit 8702671
Show file tree
Hide file tree
Showing 16 changed files with 100 additions and 23 deletions.
5 changes: 0 additions & 5 deletions ccxt.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,3 @@
if (file_exists ($file))
require_once ($file);
} );

require_once ('php/base/errors.php');
require_once ('php/base/Exchange.php');

?>
7 changes: 7 additions & 0 deletions php/AuthenticationError.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

namespace ccxt;

class AuthenticationError extends ExchangeError {

}
9 changes: 9 additions & 0 deletions php/BaseError.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

namespace ccxt;

use Exception;

class BaseError extends Exception {

}
7 changes: 7 additions & 0 deletions php/CancelPending.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

namespace ccxt;

class CancelPending extends InvalidOrder {

}
7 changes: 7 additions & 0 deletions php/DDoSProtection.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

namespace ccxt;

class DDoSProtection extends NetworkError {

}
7 changes: 7 additions & 0 deletions php/ExchangeError.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

namespace ccxt;

class ExchangeError extends BaseError {

}
7 changes: 7 additions & 0 deletions php/ExchangeNotAvailable.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

namespace ccxt;

class ExchangeNotAvailable extends NetworkError {

}
7 changes: 7 additions & 0 deletions php/InsufficientFunds.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

namespace ccxt;

class InsufficientFunds extends ExchangeError {

}
7 changes: 7 additions & 0 deletions php/InvalidNonce.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

namespace ccxt;

class InvalidNonce extends ExchangeError {

}
7 changes: 7 additions & 0 deletions php/InvalidOrder.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

namespace ccxt;

class InvalidOrder extends ExchangeError {

}
7 changes: 7 additions & 0 deletions php/NetworkError.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

namespace ccxt;

class NetworkError extends BaseError {

}
7 changes: 7 additions & 0 deletions php/NotSupported.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

namespace ccxt;

class NotSupported extends ExchangeError {

}
7 changes: 7 additions & 0 deletions php/OrderNotCached.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

namespace ccxt;

class OrderNotCached extends InvalidOrder {

}
7 changes: 7 additions & 0 deletions php/OrderNotFound.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

namespace ccxt;

class OrderNotFound extends InvalidOrder {

}
7 changes: 7 additions & 0 deletions php/RequestTimeout.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

namespace ccxt;

class RequestTimeout extends NetworkError {

}
18 changes: 0 additions & 18 deletions php/errors.php

This file was deleted.

0 comments on commit 8702671

Please sign in to comment.