LunaCON: on 'starttrack' with null music, issue a 'soft' error.

That is, one that doesn't break the control flow.

git-svn-id: https://svn.eduke32.com/eduke32@4142 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2013-11-08 18:08:42 +00:00
parent 84357152eb
commit f620a28d74
2 changed files with 8 additions and 10 deletions

View file

@ -1794,8 +1794,12 @@ function _starttrack(level)
bcheck.level_idx(level)
if (ffiC.G_StartTrack(level) ~= 0) then
error("null music for volume "..ffiC.ud.volume_number..
" level "..level, 2)
-- Issue a 'soft error', not breaking the control flow.
local errmsg = debug.traceback(
format("null music for volume %d level %d", ffiC.ud.volume_number, level), 2)
errmsg = lprivate.tweak_traceback_msg(errmsg)
ffiC.El_OnError(errmsg)
print("^10error: "..errmsg)
end
end
@ -1835,18 +1839,10 @@ end
-- TODO: saving/restoration of per-player or per-actor gamevars.
function _savemapstate()
ffiC.G_SaveMapState()
local errmsg = debug.traceback(
"warning: savemapstate: gamevar saving not fully implemented", 2)
ffiC.El_OnError(errmsg)
print(errmsg)
end
function _loadmapstate()
ffiC.G_RestoreMapState()
local errmsg = debug.traceback(
"warning: loadmapstate: gamevar saving not fully implemented", 2)
ffiC.El_OnError(errmsg)
print(errmsg)
end
-- Gamevar persistence in the configuration file

View file

@ -2234,6 +2234,8 @@ do
return errmsg:gsub('%[string "CON"%]:([0-9]+)', transline)
end
lprivate.tweak_traceback_msg = tweak_traceback_msg
set_tweak_traceback_internal(tweak_traceback_msg)
end