public static ValidationEvent fromSourceException(SourceException exception, String prefix, ShapeId shapeId) {
        // Get the message without source location since it's in the event.
        return ValidationEvent.builder()
                .id(MODEL_ERROR)
                .severity(ERROR)
                .message(prefix + exception.getMessageWithoutLocation())
                .sourceLocation(exception.getSourceLocation())
                .shapeId(shapeId)
                .build();
    }
Creates a new ValidationEvent from a {@link SourceException}.

@param exception Exception to use to create the event.
@param prefix Prefix string to add to the message.
@param shapeId ShapeId to associate with the event.
@return Returns a created validation event with an ID of Model.
smithy-model/src/main/java/software/amazon/smithy/model/validation/ValidationEvent.java