Minor: improve exception handling in exchange

This commit is contained in:
hroff-1902 2020-05-09 09:29:40 +03:00
parent 18ec65e05f
commit d4362ed357

View File

@ -1041,9 +1041,9 @@ class Exchange:
return matched_trades return matched_trades
except ccxt.NetworkError as e: except (ccxt.NetworkError, ccxt.ExchangeError) as e:
raise TemporaryError( raise TemporaryError(
f'Could not get trades due to networking error. Message: {e}') from e f'Could not get trades due to {e.__class__.__name__}. Message: {e}') from e
except ccxt.BaseError as e: except ccxt.BaseError as e:
raise OperationalException(e) from e raise OperationalException(e) from e