WurstScript icon indicating copy to clipboard operation
WurstScript copied to clipboard

Nicer error messages for permission problems

Open peq opened this issue 8 years ago • 1 comments

Currently the compiler will crash when access to a file is permitted. Instead it should give a nice error message.

Case 1:

java.io.FileNotFoundException: C:\Users\....\challenge\.....w3x (Access is denied)
java.io.FileOutputStream.open(Native Method)
java.io.FileOutputStream.<init>(FileOutputStream.java:213)
java.io.FileOutputStream.<init>(FileOutputStream.java:162)
systems.crigges.jmpq3.JMpqEditor.close(JMpqEditor.java:486)
de.peeeq.wurstio.mpq.Jmpq3BasedEditor.close(Jmpq3BasedEditor.java:58)
de.peeeq.wurstio.Main.main(Main.java:137)

Case 2:

java.lang.Error: Could not move war3map.j from C:\Users\...\AppData\Local\Temp\war3map7905028479323809809.j to C:\Users\....\challenge\wurst\war3map.j
de.peeeq.wurstio.WurstCompilerJassImpl.processMap(WurstCompilerJassImpl.java:599)
de.peeeq.wurstio.WurstCompilerJassImpl.parseFiles(WurstCompilerJassImpl.java:200)
de.peeeq.wurstio.Main.doCompilation(Main.java:180)
de.peeeq.wurstio.Main.main(Main.java:130)

peq avatar Aug 05 '16 22:08 peq

Would still be nice to have. ideally add a prompt to wait until the file can be replaced, so I don't have to recompile the whole project again.

Frotty avatar Sep 15 '18 11:09 Frotty