1
0
Fork 0
mirror of https://github.com/Reuh/anselme.git synced 2025-10-28 09:09:31 +00:00

Use love.filesystem instead of io.open to read files if running inside Löve

Also small improvement to error reporting
This commit is contained in:
Étienne Fildadut 2021-04-09 18:12:11 +02:00
parent 0df120eeaf
commit f93d6fab6b
2 changed files with 20 additions and 8 deletions

View file

@ -3,7 +3,7 @@ local truthy, flush_state, to_lua, eval_text
local function write_event(state, type, data)
if state.interpreter.event_buffer and state.interpreter.event_type ~= type then
error("previous event has not been flushed")
error(("previous event of type %q has not been flushed, can't write new %q event"):format(state.interpreter.event_type, type))
end
if not state.interpreter.event_buffer then
state.interpreter.event_type = type