mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-16 16:58:56 +00:00
[validation] Improved error message for invalid attempt to create a FeatureBasedDiagnostic
This commit is contained in:
parent
750f07ad9f
commit
dfd9fa96c9
1 changed files with 1 additions and 1 deletions
|
@ -30,7 +30,7 @@ public class FeatureBasedDiagnostic extends AbstractValidationDiagnostic {
|
|||
super(severity, message, source, checkType, issueCode, issueData);
|
||||
if (feature != null && source != null) {
|
||||
if (source.eClass().getEStructuralFeature(feature.getName()) != feature) {
|
||||
throw new IllegalArgumentException("EClass '" + source.eClass().getName() + "' does not expose a feature '" + feature.getName() + "'");
|
||||
throw new IllegalArgumentException("The sources EClass '" + source.eClass().getName() + "' does not expose the feature '" + feature.getEContainingClass().getName() + "." + feature.getName() + "'");
|
||||
}
|
||||
}
|
||||
this.feature = feature;
|
||||
|
|
Loading…
Reference in a new issue