Merge text.love
[?]
Sep 4, 2023, 9:10 PM
R6MB3UPBWL3PYRPVDCJFJIYGIJUV4ALGYUIGKGD3BZXCIAE6R5CQCDependencies
- [2]
IZGZEWFGswitch to source editor on error - [3]
CUFW4EJLreorganize app.lua and its comments - [4]
DMS3N5YDundo an ancient hack; be an idiomatic LÖVE app - [5]
AVTNUQYRbasic test-enabled framework - [6]
AGJXIDOFhardcode some assumptions about how this app uses love - [7]
3QNOKBFMbeginnings of a test harness - [8]
D2IADHMWlink to default love.run for comparison - [9]
CA5T33FGone more implication
Change contents
- edit in app.lua at line 5
-- * recover from errors (by switching to the source editor) - replacement in app.lua at line 36
xpcall(function() love.handlers[name](a,b,c,d,e,f) end, handle_error)love.handlers[name](a,b,c,d,e,f) - replacement in app.lua at line 41
xpcall(function() App.update(dt) end, handle_error)App.update(dt) - replacement in app.lua at line 45
xpcall(App.draw, handle_error)App.draw() - edit in app.lua at line 52
function handle_error(err)Error_message = debug.traceback('Error: ' .. tostring(err), --[[stack frame]]2):gsub('\n[^\n]+$', '')print(Error_message)if Current_app == 'run' thenSettings.current_app = 'source'love.filesystem.write('config', json.encode(Settings))load_file_from_source_or_save_directory('main.lua')App.undo_initialize()App.run_tests_and_initialize()elselove.event.quit()endend