WurstScript
WurstScript copied to clipboard
Nicer error messages for permission problems
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)
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.