Vinod Kumar S | 212fcdd | 2016-02-05 16:15:09 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016 Open Networking Laboratory |
| 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 | package org.onosproject.yangutils.datamodel.exceptions; |
| 17 | |
| 18 | /** |
| 19 | * Base class for exceptions in data model operations. |
| 20 | */ |
| 21 | public class DataModelException extends Exception { |
| 22 | |
| 23 | private static final long serialVersionUID = 201601270658L; |
| 24 | |
| 25 | /** |
| 26 | * Constructor to create a data model exception with message. |
| 27 | * |
| 28 | * @param message the detail of exception in string |
| 29 | */ |
| 30 | public DataModelException(String message) { |
| 31 | super(message); |
| 32 | } |
| 33 | |
| 34 | /** |
| 35 | * Constructor to create exception from message and cause. |
| 36 | * |
| 37 | * @param message the detail of exception in string |
| 38 | * @param cause underlying cause of the error |
| 39 | */ |
| 40 | public DataModelException(final String message, final Throwable cause) { |
| 41 | super(message, cause); |
| 42 | } |
| 43 | |
| 44 | /** |
| 45 | * Constructor to create exception from cause. |
| 46 | * |
| 47 | * @param cause underlying cause of the error |
| 48 | */ |
| 49 | public DataModelException(final Throwable cause) { |
| 50 | super(cause); |
| 51 | } |
| 52 | } |