4d982c49f9692d8a6cf787f75e34ad405326fc28
[ovsdb.git] / library / impl / src / main / java / org / opendaylight / ovsdb / lib / error / SchemaVersionMismatchException.java
1 /*
2  * Copyright (c) 2014, 2015 Red Hat, Inc. and others. All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.ovsdb.lib.error;
10
11 import org.opendaylight.ovsdb.lib.notation.Version;
12
13 /**
14  * This exception is used when the a table or row is accessed though a typed interface
15  * and the version requirements are not met.
16  */
17 public class SchemaVersionMismatchException extends RuntimeException {
18     private static final long serialVersionUID = -5194270510726950745L;
19
20     public SchemaVersionMismatchException(final Version schemaVersion, final Version fromVersion,
21             final Version untilVersion) {
22         super("The schema version used to access the table/column (" + schemaVersion + ") does not match the required"
23                 + " version (from " + fromVersion + " to " + untilVersion + ")");
24     }
25 }