def error_repr(e):
    if isinstance(e, (ScriptError, lupa.LuaSyntaxError, lupa.LuaError)):
        if isinstance(e, ScriptError):
            info = e.args[0]
            tp = info['type']
        else:
            info = parse_error_message(e.args[0])
            tp = ScriptError.SYNTAX_ERROR
        line_num = info.get('line_number', -1)
        message = info.get('error', info.get('message'))
        return "%s [input]:%s: %s" % (tp, line_num, message)
    elif isinstance(e, Exception):
        return repr(e)
    return ScriptError.UNKNOWN_ERROR
Format the event using string.format notation.
dataset/ETHPy150Open scrapinghub/splash/splash/kernel/errors.py/error_repr--crossover with--dataset/ETHPy150Open artirix/logcabin/logcabin/event.py/Event.format