modelix / modelix/modelix.core
Throw a specialized Exception for Mandatory elements
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 16
- Forks
- 10
- Avg merge
- 3h 9m
- Merged PRs (30d)
- 26
Description
The MandatoryReferenceAccessor currently throws a RuntimeException when a mandatory reference is missing:
When propagating changes to clients, catching RuntimeException is too generic. We should be more specific here, for example by throwing our own, e.g. MandatoryReferenceMissingException.
This is also applicable to other parts in the code, for example:
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with metamodel-runtime/src/commonMain/kotlin/org/modelix/metamodel/ReferenceAccessor.kt at the MandatoryReferenceAccessor failure, then inspect ChildAccessor.kt at the referenced line for similar behavior. Trace how these exceptions are propagated to clients and define the dedicated exception coverage needed so callers can distinguish missing mandatory references from generic runtime failures.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100