diff options
-rw-r--r-- | file.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/file.lua b/file.lua index d3ccca2..92561bd 100644 --- a/file.lua +++ b/file.lua @@ -30,6 +30,9 @@ end function save_to_disk(lines, filename) local outfile = App.open_for_writing(filename) + if outfile == nil then + error('failed to write to "'..filename..'"') + end for _,line in ipairs(lines) do if line.mode == 'drawing' then store_drawing(outfile, line) |