From 8d00da889d54148eb591e67337799f4d1814a032 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 5 Jul 2022 14:02:52 -0700 Subject: better error message https://tildegit.org/akkartik/lines.love/issues/1 --- file.lua | 3 +++ 1 file changed, 3 insertions(+) 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) -- cgit 1.4.1-2-gfad0