Scenario: on.draw = function() f() end
f = function() f() end
Before this commit, the app would crash without error.
Summary of error handling in Lua and LÖVE:
23BYUXSYSYNIVNZI5YN3UGW2J4RVJY2N3OYT2BY7UQ52ZZDH6ZOQC local callstack = debug.traceback('', --[[stack frame]]2)local cleaned_up_error = 'Error: ' .. cleaned_up_frame(tostring(err))..'\n'..cleaned_up_callstack(callstack)
local cleaned_up_error = errif not err:match('stack overflow') thenlocal callstack = debug.traceback('', --[[stack frame]]2)cleaned_up_error = 'Error: ' .. cleaned_up_frame(tostring(err))..'\n'..cleaned_up_callstack(callstack)else-- call only primitive functions when we're out of stack spaceend
* Don't start the driver app while multiple freewheeling apps are running. Ifyou have a driver app running with one app, shut it down before you switchapps. Just always open the app and then the driver. If you close the app,close the driver.* Don't give up your other tools just yet. It's easy to make a mistake thatthe app doesn't recover from when you fix it. Try restarting the app, and ifit still doesn't work, perhaps you need to fix the initial load. This isn'tyet a tool you can keep open for months on end. (And I'm ambivalent aboutmaking it such a tool since your programs might stop working for others.)
* This approach puts one top-level definition per file, and so obscures theorder in which definitions are loaded. In particular, initializing a globaltable to contain other global definitions will fail if you originallyauthored the other global definitions after the table.
* I still see driver and the app being driven occasionally crash. When I do Itry to make things more robust. If you do you'll quite possibly crash againif you try to restart. In such a situation you'll have to bump down toediting the underlying version files by other means. See [representation.md](representation.md)for details of the underlying representation on disk.
I never initialize global tables with other definitions. That kind of thinghappens in `on.initialize` (akin to `love.load`; see reference.md) or`on.code_change`.
* Given the above issues, both this driver and its client freewheeling appbenefit from being launched in terminal windows rather than by being clickedon in a desktop OS.
* Don't start the driver app while multiple freewheeling apps are running. Ifyou have a driver app running with one app, shut it down before you switchapps.