don't suggest pressing a key on initialization errors

akkartik
Dec 12, 2024, 7:29 AM
RFJTSX3WULHYVHIO3WUZLTKO3PLE6VMWAIIJQKVPJ344KE3FCO7AC

Dependencies

Change contents

  • replacement in live.lua at line 489
    [3.734][3.734:759]()
    live.handle_error(err)
    [3.705]
    [2.1763]
    local callstack = debug.traceback('', --[[stack frame]]2)
    local cleaned_up_error = 'Error: ' .. cleaned_up_frame(tostring(err))..'\n'..cleaned_up_callstack(callstack)
    live.send_run_time_error_to_driver(cleaned_up_error)
    love.graphics.setFont(love.graphics.newFont(20))
    Error_message = 'Something is wrong. Sorry!\n\n'..cleaned_up_error..'\n\n'..
    'Options:\n'..
    '- press "ctrl+c" (without the quotes) to copy this message to your clipboard to send to me: ak@akkartik.com\n'..
    '- run driver.love to try to fix it yourself. As you do, feel free to ask me questions: ak@akkartik.com\n'
    Error_count = Error_count+1
    if Error_count > 1 then
    Error_message = Error_message..('\n\nThis is error #%d in this session; things will probably not improve in this session. Please copy the message and send it to me: ak@akkartik.com.'):format(Error_count)
    end
    print(Error_message)
    error_frame_keys_down = {}