

def exit_with_error(e, errorcode=2, log_traceback=True):
    if log_traceback:
        logger.error(''.join(traceback.format_stack()))
    logger.error(str(e))
    if run_by_splunk():
        splunk.Intersplunk.generateErrorResults(str(e))
    sys.exit(errorcode)

dataset/ETHPy150Open PaloAltoNetworks/SplunkforPaloAltoNetworks/bin/lib/common.py exit_with_error/original