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

Compilation errors on CLI execution include a stacktrace #6573

Closed
JaroslavTulach opened this issue May 5, 2023 · 0 comments · Fixed by #6574
Closed

Compilation errors on CLI execution include a stacktrace #6573

JaroslavTulach opened this issue May 5, 2023 · 0 comments · Fixed by #6574
Assignees

Comments

@JaroslavTulach
Copy link
Member

If one creates an erroneous file z.enso:

import Standard.Base.Data.Numbers.Number

plus : Xyz -> Abc -> Number
plus (a : Xyz) (b : Abc) = a + b

and runs it, this is the output:

enso$ ./built-distribution/enso-engine-0.0.0-dev-linux-amd64/enso-0.0.0-dev/bin/enso --run z.enso 
In module z:
Compiler encountered errors:
z.enso[3:8-3:10]: The name `Xyz` could not be found.
z.enso[3:15-3:17]: The name `Abc` could not be found.
Aborting due to 2 errors and 0 warnings.
Execution finished with an error: Compilation aborted due to errors.
        at <java> org.graalvm.sdk/org.graalvm.polyglot.Value.invokeMember(Value.java:971)
        at <java> org.enso.polyglot.Module.getAssociatedType(Module.scala:19)
        at <java> org.enso.runner.Main$.runMain(Main.scala:802)
        at <java> org.enso.runner.Main$.runSingleFile(Main.scala:734)
        at <java> org.enso.runner.Main$.run(Main.scala:616)
        at <java> org.enso.runner.Main$.main(Main.scala:1112)
        at <java> org.enso.runner.Main.main(Main.scala)

the exception stacktrace is wrong in this case and has no reasonable meaning. Avoid printing it.

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

Successfully merging a pull request may close this issue.

1 participant