コード例 #1
0
ファイル: main.py プロジェクト: yushu9/rqalpha
def _exception_handler(e):
    user_system_log.exception(_(u"strategy execute exception"))
    user_system_log.error(e.error)
    if not is_user_exc(e.error.exc_val):
        return const.EXIT_CODE.EXIT_INTERNAL_ERROR

    return const.EXIT_CODE.EXIT_USER_ERROR
コード例 #2
0
def _exception_handler(e):
    better_exceptions.excepthook(e.error.exc_type, e.error.exc_val, e.error.exc_tb)
    user_system_log.error(e.error)
    if not is_user_exc(e.error.exc_val):
        code = const.EXIT_CODE.EXIT_INTERNAL_ERROR
        system_log.exception(_(u"strategy execute exception"))
    else:
        code = const.EXIT_CODE.EXIT_USER_ERROR
        user_detail_log.exception(_(u"strategy execute exception"))

    return code
コード例 #3
0
def _exception_handler(e):
    try:
        sys.excepthook(e.error.exc_type, e.error.exc_val, e.error.exc_tb)
    except Exception as e:
        system_log.exception("hook exception failed")

    user_system_log.error(e.error)
    if not is_user_exc(e.error.exc_val):
        code = const.EXIT_CODE.EXIT_INTERNAL_ERROR
        system_log.error(_(u"strategy execute exception"), exc=e)
    else:
        code = const.EXIT_CODE.EXIT_USER_ERROR
        user_detail_log.error(_(u"strategy execute exception"), exc=e)

    return code
コード例 #4
0
ファイル: main.py プロジェクト: gaoyunhua/rqalpha
def _exception_handler(e):
    try:
        sys.excepthook(e.error.exc_type, e.error.exc_val, e.error.exc_tb)
    except Exception as e:
        system_log.exception("hook exception failed")

    user_system_log.error(e.error)
    if not is_user_exc(e.error.exc_val):
        code = const.EXIT_CODE.EXIT_INTERNAL_ERROR
        system_log.error(_(u"strategy execute exception"), exc=e)
    else:
        code = const.EXIT_CODE.EXIT_USER_ERROR
        user_detail_log.error(_(u"strategy execute exception"), exc=e)

    return code
コード例 #5
0
ファイル: signal_broker.py プロジェクト: 8dspaces/rqalpha
 def cancel_order(self, order):
     user_system_log.error(_(u"cancel_order function is not supported in signal mode"))
     return None
コード例 #6
0
 def cancel_order(self, order):
     user_system_log.error(
         _(u"cancel_order function is not supported in signal mode"))
     return None