From 727fe0eb1cf627f174ce7c3b5874e1f242cb902b Mon Sep 17 00:00:00 2001 From: leaf corcoran Date: Wed, 5 Feb 2014 13:08:27 -0800 Subject: [PATCH] show file in error message in moon loader --- moonscript/base.lua | 2 +- moonscript/base.moon | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/moonscript/base.lua b/moonscript/base.lua index f3b6b39..06b3f6d 100644 --- a/moonscript/base.lua +++ b/moonscript/base.lua @@ -62,7 +62,7 @@ moon_loader = function(name) file:close() local res, err = loadstring(text, file_path) if not res then - error(err) + error(file_path .. ": " .. err) end return res end diff --git a/moonscript/base.moon b/moonscript/base.moon index fe8e3de..256b0d7 100644 --- a/moonscript/base.moon +++ b/moonscript/base.moon @@ -48,7 +48,7 @@ moon_loader = (name) -> file\close! res, err = loadstring text, file_path if not res - error err + error file_path .. ": " .. err return res