From 024aa3ab6b6e5e0ba11bf7cfe0035cb83423bbf3 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 30 Dec 2019 14:57:26 +0100 Subject: [PATCH] Move exceptions to seperate module --- freqtrade/__init__.py | 31 ------------------------------- freqtrade/exceptions.py | 31 +++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 31 deletions(-) create mode 100644 freqtrade/exceptions.py diff --git a/freqtrade/__init__.py b/freqtrade/__init__.py index 83fee0b0d..e1f65d4fe 100644 --- a/freqtrade/__init__.py +++ b/freqtrade/__init__.py @@ -11,34 +11,3 @@ if __version__ == 'develop': except Exception: # git not available, ignore pass - - -class DependencyException(Exception): - """ - Indicates that an assumed dependency is not met. - This could happen when there is currently not enough money on the account. - """ - - -class OperationalException(Exception): - """ - Requires manual intervention and will usually stop the bot. - This happens when an exchange returns an unexpected error during runtime - or given configuration is invalid. - """ - - -class InvalidOrderException(Exception): - """ - This is returned when the order is not valid. Example: - If stoploss on exchange order is hit, then trying to cancel the order - should return this exception. - """ - - -class TemporaryError(Exception): - """ - Temporary network or exchange related error. - This could happen when an exchange is congested, unavailable, or the user - has networking problems. Usually resolves itself after a time. - """ diff --git a/freqtrade/exceptions.py b/freqtrade/exceptions.py new file mode 100644 index 000000000..80d45dd86 --- /dev/null +++ b/freqtrade/exceptions.py @@ -0,0 +1,31 @@ + + +class DependencyException(Exception): + """ + Indicates that an assumed dependency is not met. + This could happen when there is currently not enough money on the account. + """ + + +class OperationalException(Exception): + """ + Requires manual intervention and will usually stop the bot. + This happens when an exchange returns an unexpected error during runtime + or given configuration is invalid. + """ + + +class InvalidOrderException(Exception): + """ + This is returned when the order is not valid. Example: + If stoploss on exchange order is hit, then trying to cancel the order + should return this exception. + """ + + +class TemporaryError(Exception): + """ + Temporary network or exchange related error. + This could happen when an exchange is congested, unavailable, or the user + has networking problems. Usually resolves itself after a time. + """