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

Fix incorrect creation of CommandSyntaxException with cause #828

Merged
merged 1 commit into from
Jul 20, 2024

Conversation

Marcono1234
Copy link
Contributor

Purpose

Fixes #786
At least the IllegalStateException thrown by initCause; the reason why the activity search failed in the first place is a different issue (and I don't know the reason for that at the moment)

Approach

Use Throwable#addSuppressed instead of Throwable#initCause

Checklist

  • Included tests
  • Updated documentation in README
    and docs folder
  • Tested in MCTEST-xxx

Previously `initCause` was failing because `CommandSyntaxException` is
created by Brigadier in a way which does not permit setting a cause.
Therefore, now instead add the cause exception as 'suppressed'.
@violine1101
Copy link
Member

Thanks!

Fyi, we may up removing this command altogether since we don't need it very often anymore, so it isn't a huge issue that it doesn't work right now. But in case we do want to keep it this'll help us understand what's going wrong with it at the moment.

@violine1101 violine1101 merged commit 505c722 into mojira:master Jul 20, 2024
3 checks passed
@Marcono1234 Marcono1234 deleted the command-exception-cause branch July 21, 2024 15:46
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

Successfully merging this pull request may close these issues.

ARISA_REMOVE_CONTENT command error
2 participants