diff --git a/src/main/java/org/eclipse/esmf/ame/resolver/strategy/ResolutionStrategy.java b/src/main/java/org/eclipse/esmf/ame/resolver/strategy/ResolutionStrategy.java index 58d824cd..b91030fb 100644 --- a/src/main/java/org/eclipse/esmf/ame/resolver/strategy/ResolutionStrategy.java +++ b/src/main/java/org/eclipse/esmf/ame/resolver/strategy/ResolutionStrategy.java @@ -124,8 +124,9 @@ private Try tryOnFailure( final AspectModelUrn aspectModelUrn ) { return Try.success( currentAspectModel ); } - return Try.failure( new UrnNotFoundException( String.format( "%s cannot be resolved correctly.", aspectModelUrn ), - aspectModelUrn ) ); + return Try.failure( new UrnNotFoundException( String.format( + "The model failed to load because the reference '%s' in the same namespace was unresolved.", + aspectModelUrn ), aspectModelUrn ) ); } protected abstract Try getModelFromFileSystem( AspectModelUrn aspectModelUrn, Path rootPath ); diff --git a/src/main/java/org/eclipse/esmf/ame/validation/ViolationFormatter.java b/src/main/java/org/eclipse/esmf/ame/validation/ViolationFormatter.java index 7b86c850..b8ec48e3 100644 --- a/src/main/java/org/eclipse/esmf/ame/validation/ViolationFormatter.java +++ b/src/main/java/org/eclipse/esmf/ame/validation/ViolationFormatter.java @@ -114,6 +114,8 @@ public ViolationError visitProcessingViolation( final ProcessingViolation violat if ( violation.cause() instanceof UrnNotFoundException urnNotFoundException ) { violationError.setFocusNode( urnNotFoundException.getUrn() ); + violationError.setFix( List.of( + "Ensure the referred element is available. If it's in a different model of the same namespace, include it in your workspace or the imported package." ) ); } return violationError;