mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-10 16:58:08 +00:00
commit
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
- [Basic Error Handling](./examples/php/)
|
||||
|
||||
|
||||
```php
|
||||
<?php
|
||||
|
||||
include './ccxt.php';
|
||||
|
||||
date_default_timezone_set('UTC');
|
||||
|
||||
$exchange = new \ccxt\bittrex ();
|
||||
|
||||
$message = null;
|
||||
|
||||
try {
|
||||
|
||||
$result = $exchange->fetch_ticker ('NONEXISTENT_SYMBOL');
|
||||
var_dump ($result);
|
||||
|
||||
} catch (Exception $e) {
|
||||
|
||||
// print it
|
||||
echo $e->getMessage() . "\n";
|
||||
|
||||
// save to $message (for whatever needs)
|
||||
$message = $e->getMessage();
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user