eclipse-gemoc / eclipse-gemoc/gemoc-studio

Need error handling when the provided input model is of wrong type

Open
#15 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
PostScript
Stars
27
Forks
22
PR merge metrics
No merged PRs in 30d

Description

Consider a melange declaration with:
```
package org.company.mysequentiallanguage

import model.aspects.AAspect

language MySequentialLanguage {
syntax "platform:/resource/org.company.mysequentiallanguage.mysequentiallanguage.model/model/model.ecore"
with AAspect
}
```

At the moment, GEMOC does not forbid the execution of a model conforming to the abstract syntax, even though the model can only be executed if it conforms to the ecore metamodel generated by Melange. Hence, when the execution starts, there is an exception thrown about the invalid type of the root element.

We would need either a better check in the run configuration, or at least a better error message from the execution engine.

**To reproduce**:
- Create metamodel with metaclass A
- Create dynamic instance of A (for later)
- Create K3 aspect on A
- Create unique melange language (no `external`), and generate all
- Start modeling workbench
- Execute the dynamic instance confiorming to the original metamodel

**What we see:** an unreadable exception in the console about some invalid type

**What we would expect:** an error message saying that the provided model is of wrong type, OR an error in the run configuration window saying that the chosen model is invalid

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.