Skip to content

Commit 8765800

Browse files
jafingerhutstuarthalloway
authored andcommitted
CLJ-1297: Extra hint in exception if loading file containing - fails
Signed-off-by: Stuart Halloway <[email protected]>
1 parent 044930b commit 8765800

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/jvm/clojure/lang/RT.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,8 @@ static public void load(String scriptbase, boolean failIfNotFound) throws IOExce
440440
loadResourceScript(RT.class, cljfile);
441441
}
442442
else if(!loaded && failIfNotFound)
443-
throw new FileNotFoundException(String.format("Could not locate %s or %s on classpath: ", classfile, cljfile));
443+
throw new FileNotFoundException(String.format("Could not locate %s or %s on classpath.%s", classfile, cljfile,
444+
scriptbase.contains("_") ? " Please check that namespaces with dashes use underscores in the Clojure file name." : ""));
444445
}
445446

446447
static void doInit() throws ClassNotFoundException, IOException{

0 commit comments

Comments
 (0)