Merge lines.love
This commit is contained in:
commit
a1da45228a
5
app.lua
5
app.lua
|
@ -44,7 +44,7 @@ end
|
||||||
|
|
||||||
function handle_error(err)
|
function handle_error(err)
|
||||||
local callstack = debug.traceback('', --[[stack frame]]2)
|
local callstack = debug.traceback('', --[[stack frame]]2)
|
||||||
Error_message = 'Error: ' .. tostring(err)..'\n'..clean_up_callstack(callstack)
|
Error_message = 'Error: ' .. tostring(err)..'\n'..cleaned_up_callstack(callstack)
|
||||||
print(Error_message)
|
print(Error_message)
|
||||||
if Current_app == 'run' then
|
if Current_app == 'run' then
|
||||||
Settings.current_app = 'source'
|
Settings.current_app = 'source'
|
||||||
|
@ -61,9 +61,8 @@ end
|
||||||
-- rather than offload that to load().
|
-- rather than offload that to load().
|
||||||
-- Functions compiled in this manner have ugly filenames of the form [string "filename"]
|
-- Functions compiled in this manner have ugly filenames of the form [string "filename"]
|
||||||
-- This function cleans out this cruft from error callstacks.
|
-- This function cleans out this cruft from error callstacks.
|
||||||
function clean_up_callstack(callstack)
|
function cleaned_up_callstack(callstack)
|
||||||
local frames = {}
|
local frames = {}
|
||||||
print(callstack)
|
|
||||||
for frame in string.gmatch(callstack, '[^\n]+\n*') do
|
for frame in string.gmatch(callstack, '[^\n]+\n*') do
|
||||||
local line = frame:gsub('^%s*(.-)\n?$', '%1')
|
local line = frame:gsub('^%s*(.-)\n?$', '%1')
|
||||||
local filename, rest = line:match('([^:]*):(.*)')
|
local filename, rest = line:match('([^:]*):(.*)')
|
||||||
|
|
Loading…
Reference in New Issue