Merge pull request #3275 from hroff-1902/exchange-cosmetics-2

Minor: improve exception handling in exchange
This commit is contained in:
Matthias 2020-05-09 19:25:35 +02:00 committed by GitHub
commit 37439b836b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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