Skip to content

Commit

Permalink
Show error in Exception message
Browse files Browse the repository at this point in the history
  • Loading branch information
pcatlin committed Sep 22, 2020
1 parent 999adfa commit 4f1d5e8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/RateQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ public function __construct($fromCurrency, $toCurrency)

if( !isset($data->status) || $data->status != "ok"){
$this->data = null;
throw new \Exception('Error in received exchange rate data');
$message = 'Error in received exchange rate data - ' . var_export($data,true);
throw new \Exception( $message );
}

$this->data = $data;
Expand Down

0 comments on commit 4f1d5e8

Please sign in to comment.