nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c95a19b
)
loader: `load_module` error message distinguish non-existing file from invalid file
author
Jean Privat
<jean@pryen.org>
Sat, 14 Mar 2015 06:34:20 +0000
(13:34 +0700)
committer
Jean Privat
<jean@pryen.org>
Wed, 18 Mar 2015 03:57:11 +0000
(10:57 +0700)
Signed-off-by: Jean Privat <jean@pryen.org>
src/loader.nit
patch
|
blob
|
history
diff --git
a/src/loader.nit
b/src/loader.nit
index
8b6b56d
..
3001ac8
100644
(file)
--- a/
src/loader.nit
+++ b/
src/loader.nit
@@
-466,7
+466,11
@@
redef class ModelBuilder
# Look for the module
var file = identify_file(filename)
if file == null then
- toolcontext.error(null, "Error: cannot find module `{filename}`.")
+ if filename.file_exists then
+ toolcontext.error(null, "Error: `{filename}` is not a Nit source file.")
+ else
+ toolcontext.error(null, "Error: cannot find module `{filename}`.")
+ end
return null
end