All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.yahoo.elide.modelconfig.InvalidSchemaException Maven / Gradle / Ivy

There is a newer version: 7.1.2
Show newest version
/*
 * Copyright 2023, the original author or authors.
 * Licensed under the Apache License, Version 2.0
 * See LICENSE file in project root for terms.
 */
package com.yahoo.elide.modelconfig;


import com.networknt.schema.ValidationMessage;

import java.io.IOException;
import java.util.Set;

/**
 * Indicates that the schema is not valid.
 */
public class InvalidSchemaException extends IOException {

    private static final long serialVersionUID = 1L;

    private final Set validationMessages;
    private final String fileName;

    public InvalidSchemaException(String fileName, Set validationMessages) {
        super("Schema validation failed for: " + fileName + ValidationMessages.toString(validationMessages));
        this.fileName = fileName;
        this.validationMessages = validationMessages;
    }

    public Set getValidationMessages() {
        return validationMessages;
    }

    public String getFileName() {
        return fileName;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy