Skip to content

Commit

Permalink
Swallow all validator exceptions
Browse files Browse the repository at this point in the history
so the LSP server does not terminate when an exception is thrown during validation. Usually exceptions are only thrown, when the model is not well-formed, which will either be a syntactical error (will be displayed on the client), or another validation rule will find it. In either case, we can safely ignore all exceptions.
  • Loading branch information
arminzavada committed Oct 5, 2024
1 parent 07b5de3 commit dd73e0f
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ public class OxstsValidator extends AbstractOxstsValidator {
public static final String INVALID_INLINING = "invalidInlining";
public static final String INVALID_MULTIPLICITIY = "invalidMultiplicity";

@Override
protected void handleExceptionDuringValidation(Throwable targetException) throws RuntimeException {
// swallow all exceptions!
}

@Check
public void checkFeatureSubsetting(Feature feature) {
if (feature.getSubsets().isEmpty()) return;
Expand Down

0 comments on commit dd73e0f

Please sign in to comment.