blob: 1c33a088b899cbb7faa4ade390bc30b084c07b59 [file] [log] [blame]
Yuta HIGUCHIe0d8b082017-08-30 17:24:41 -07001/*
2 * Copyright 2017-present Open Networking Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package org.onosproject.yang.runtime.impl;
18
19/**
20 * Represents exception that needs to be handled by model converter.
21 */
22// extending ModelConvertorException for backward compatibility,
23// directly extend RuntimeException when removing Exception class with typo
24@SuppressWarnings("deprecation")
25class ModelConverterException
26 extends ModelConvertorException {
27
28 private static final long serialVersionUID = 4586537426529302237L;
29
30 /**
31 * Creates model converter exception with an exception message.
32 *
33 * @param exceptionMessage message with which exception must be thrown
34 */
35 ModelConverterException(String exceptionMessage) {
36 super(exceptionMessage);
37 }
38
39 /**
40 * Creates model converter exception with an exception message and cause.
41 *
42 * @param exceptionMessage message with which exception must be thrown
43 * @param cause cause of the exception
44 */
45 ModelConverterException(String exceptionMessage, Throwable cause) {
46 super(exceptionMessage, cause);
47 }
48
49 /**
50 * Creates model converter exception with the cause for it.
51 *
52 * @param cause cause of the exception
53 */
54 ModelConverterException(Throwable cause) {
55 super(cause);
56 }
57}