Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error messages for incorrect file paths #97

Open
fedpet opened this issue Jun 26, 2019 · 0 comments
Open

Improve error messages for incorrect file paths #97

fedpet opened this issue Jun 26, 2019 · 0 comments

Comments

@fedpet
Copy link
Contributor

fedpet commented Jun 26, 2019

Running Alchemist with this parameter
-y "path/to/a/directory"
results in the following exception (at least on Windows 10):

14:55:55.543 [main] ERROR it.unibo.alchemist.Alchemist - Unable to load the requested file.
java.io.FileNotFoundException: path/to/a/directory (Access is denied)
	at java.base/java.io.FileInputStream.open0(Native Method)
	at java.base/java.io.FileInputStream.open(FileInputStream.java:213)
	at java.base/java.io.FileInputStream.<init>(FileInputStream.java:155)
	at it.unibo.alchemist.Alchemist.main(Alchemist.java:98)

Process finished with exit code 0

And, as suggested by @DanySK, a better error message along the lines of "I expected a file, but you provided a path to a directory" is needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant