From 1a776e30e0afbbe2b7f780d64c1405057c75b607 Mon Sep 17 00:00:00 2001 From: leaf corcoran Date: Wed, 13 Apr 2016 19:47:37 -0700 Subject: [PATCH] make error message from loader more useful --- spec/helpers.moon | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spec/helpers.moon b/spec/helpers.moon index 42d578b..45545b9 100644 --- a/spec/helpers.moon +++ b/spec/helpers.moon @@ -30,7 +30,8 @@ with_dev = (fn) -> mod\match("moon%.") or mod == "moon" if testable - dev_cache[mod] = assert(loadfile(assert loader mod))! + fname = assert loader(mod), "failed to find module: #{mod}" + dev_cache[mod] = assert(loadfile fname)! return dev_cache[mod] old_require mod