Custom exceptions for XMLParsing
- Dominant language
- Java
- Stars
- 4
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
The [XMLParser](https://github.com/Ecdar/j-Ecdar/blob/main/src/parser/XMLParser.java) currently uses [IllegalStateException](https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalStateException.html) for handling invalid model features. As pointed out [here](https://github.com/Ecdar/j-Ecdar/pull/74#discussion_r992034335) an exception like [InvalidModelException](https://gitlab.eclipse.org/eclipse/escet/escet/-/blob/develop/common/org.eclipse.escet.common.app.framework/src/org/eclipse/escet/common/app/framework/exceptions/InvalidModelException.java) is more fitting. Based on [this comment](https://github.com/Ecdar/j-Ecdar/pull/74#discussion_r995577476) we could have pre-checkers for each particular operation and aggregate the exceptions and report them back.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with src/parser/XMLParser.java and review where IllegalStateException is used for invalid model features. Read the linked discussion and compare the referenced InvalidModelException implementation; done means invalid features use a fitting custom exception and the proposed pre-checking or aggregation behavior is defined consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100