diff --git a/pink/pink.lua b/pink/pink.lua index 4c8e4a6..4789a59 100644 --- a/pink/pink.lua +++ b/pink/pink.lua @@ -6,7 +6,8 @@ local getParser = function () return require(folderOfThisFile .. 'parser') end local runtime = require(folderOfThisFile .. 'runtime') local function read(file) -- TODO should this be here or in client code? At lease allow to pass an ink content in a string - if love and love.filesystem and love.filesystem.read then + if love and love.filesystem then + if not love.filesystem.isFile(file) then error('failed to open "'..file..'"') end local content, size = love.filesystem.read(file) return content else