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

ObjectParser should throw XContentParseExceptions, not IAE #30605

Closed
jpountz opened this issue May 15, 2018 · 4 comments
Closed

ObjectParser should throw XContentParseExceptions, not IAE #30605

jpountz opened this issue May 15, 2018 · 4 comments
Assignees
Labels
:Core/Infra/Core Core issues without another label >enhancement

Comments

@jpountz
Copy link
Contributor

jpountz commented May 15, 2018

ParsingException is nicer since it includes the place where the parsing error occurred.

@jpountz jpountz added >enhancement :Core/Infra/Core Core issues without another label labels May 15, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@nik9000
Copy link
Member

nik9000 commented May 15, 2018

ParsingException can't move because it extends ElasticsearchException. We made XContentParseException which doesn't extend ElasticsearchException to use directly from the xcontent stuff. I think the tests should catch either or something should wrap somewhere.

@dakrone
Copy link
Member

dakrone commented May 15, 2018

I agree with @nik9000, this should use XContentParseException so that it can keep being decoupled from ElasticsearchException

@jpountz jpountz changed the title ObjectParser should throw ParsingExceptions, not IAE ObjectParser should throw XContentParseExceptions, not IAE May 15, 2018
@jpountz
Copy link
Contributor Author

jpountz commented May 15, 2018

This sounds good to me. I updated the title and description of the issue.

@cbuescher cbuescher self-assigned this Jun 1, 2018
cbuescher pushed a commit to cbuescher/elasticsearch that referenced this issue Jun 1, 2018
ObjectParser should throw XContentParseExceptions, not IAE. A dedicated parsing
exception can includes the place where the error occurred.

Closes elastic#30605
cbuescher pushed a commit that referenced this issue Jun 4, 2018
ObjectParser should throw XContentParseExceptions, not IAE. A dedicated parsing
exception can includes the place where the error occurred.

Closes #30605
cbuescher pushed a commit that referenced this issue Jun 4, 2018
ObjectParser should throw XContentParseExceptions, not IAE. A dedicated parsing
exception can includes the place where the error occurred.

Closes #30605
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Core Core issues without another label >enhancement
Projects
None yet
Development

No branches or pull requests

5 participants