Add more descriptive messages instead of a stack trace.
When running an abs that doesn't exist.
Suggesting around "The file you specified cannot be executed. Please check the file name."
$ java -Djava.library.path=../native -jar AnyaBasic-latest.jar doesnotexists.abs
Exception in thread "main" java.lang.NullPointerException
at net.phatcode.rel.main.SourceReader.read(SourceReader.java:59)
at net.phatcode.rel.main.SourceReader.<init>(SourceReader.java:48)
at net.phatcode.rel.main.Interpreter.run(Interpreter.java:88)
at net.phatcode.rel.main.AnyaBasicMain.main(AnyaBasicMain.java:56)
When running non abs file should avoid it from opening it.
non-.abs files
"Only AnyaBasic (.abs) files are valid to be executed."
$ java -Djava.library.path=../native -jar AnyaBasic-latest.jar document.pdf
Exception in thread "main" java.lang.NullPointerException
at net.phatcode.rel.main.SourceReader.read(SourceReader.java:59)
at net.phatcode.rel.main.SourceReader.<init>(SourceReader.java:48)
at net.phatcode.rel.main.Interpreter.run(Interpreter.java:88)
at net.phatcode.rel.main.AnyaBasicMain.main(AnyaBasicMain.java:56)
no extension files are still arguably, as we need to check if it is a valid abs file and throw an error message.
$ java -Djava.library.path=../native -jar AnyaBasic-latest.jar noextension
Exception in thread "main" java.lang.NullPointerException
at net.phatcode.rel.main.SourceReader.read(SourceReader.java:59)
at net.phatcode.rel.main.SourceReader.<init>(SourceReader.java:48)
at net.phatcode.rel.main.Interpreter.run(Interpreter.java:88)
at net.phatcode.rel.main.AnyaBasicMain.main(AnyaBasicMain.java:56)
Add more descriptive messages instead of a stack trace.
When running an
absthat doesn't exist.Suggesting around
"The file you specified cannot be executed. Please check the file name."When running non
absfile should avoid it from opening it.non-
.absfiles"Only AnyaBasic (.abs) files are valid to be executed."no extension files are still arguably, as we need to check if it is a valid
absfile and throw an error message.