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

Alchemist should fail clearly when no incarnation is available #165

Closed
paagamelo opened this issue Apr 2, 2020 · 0 comments
Closed

Alchemist should fail clearly when no incarnation is available #165

paagamelo opened this issue Apr 2, 2020 · 0 comments
Milestone

Comments

@paagamelo
Copy link

Actual behaviour

At present, if Alchemist is launched and no incarnation is available (e.g. due to the fact that no incarnation module has been imported) the error message produced will look like this:

ERROR it.unibo.alchemist.Alchemist - No valid launchers.
ERROR it.unibo.alchemist.Alchemist - HeadlessSimulationLauncher: Alchemist headless runner requires a simulation file

Which does not mention the fact that no incarnation is available. If we try to run a simulation, e.g. using the protelis incarnation, we get something like this:

Exception in thread "main" java.lang.IllegalStateException: protelis is not a valid incarnation. Supported incarnations are: []

Followed by a stack trace.

Desired behaviour

When loading the main class, the classpath should be scanned looking for incarnations. If no incarnation is found:

  • a warning should be produced if the user requested to print a help message
  • a clear error, without stack trace and explaining how to solve the issue, should be produced in case the user tried to run Alchemist
@DanySK DanySK added this to the 10.0.0 milestone Jun 18, 2020
DanySK added a commit that referenced this issue Mar 29, 2021
@DanySK DanySK closed this as completed Mar 29, 2021
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

2 participants