예제 #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
 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