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
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