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

Use proper Java class name in error message #9996

Merged
merged 2 commits into from
May 20, 2024

Conversation

JaroslavTulach
Copy link
Member

@JaroslavTulach JaroslavTulach commented May 18, 2024

Pull Request Description

Better error message when static method cannot be found on a Java class.

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • All code follows the
    Java,
  • Unit tests have been written where possible.

@JaroslavTulach JaroslavTulach self-assigned this May 18, 2024
@JaroslavTulach JaroslavTulach added the CI: No changelog needed Do not require a changelog entry for this PR. label May 18, 2024
fail("Unexpected result: " + never);
} catch (PolyglotException ex) {
assertEquals(
"Method `invoke` of type java.lang.Runnable could not be found.", ex.getMessage());
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous error was:

"Method `invoke` of type Class could not be found.

which is not very useful.

Co-authored-by: Pavel Marek <pavel.marek@enso.org>
@JaroslavTulach JaroslavTulach added the CI: Ready to merge This PR is eligible for automatic merge label May 20, 2024
@mergify mergify bot merged commit befd938 into develop May 20, 2024
37 checks passed
@mergify mergify bot deleted the wip/jtulach/PolyglotImportError branch May 20, 2024 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: No changelog needed Do not require a changelog entry for this PR. CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants