blob: 03b0382ff5d828aca61c40e27b55f4b9c2ed0bc2 [file] [log] [blame]
Vidyashree Rama405d2e62016-07-08 20:45:41 +05301/*
2 * Copyright 2016-present 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
17package org.onosproject.yangutils.translator.exception;
18
19/**
20 * Represents custom translator exception for translator's operations.
21 */
22public class InvalidNodeForTranslatorException extends RuntimeException {
23
24 private static final long serialVersionUID = 20160311L;
25 private String fileName;
26
27 /**
28 * Create a new exception.
29 */
30 public InvalidNodeForTranslatorException() {
31 super();
32 }
33
34 /**
35 * Creates a new exception with given message.
36 *
37 * @param message the detail of exception in string
38 */
39 public InvalidNodeForTranslatorException(String message) {
40 super(message);
41 }
42
43 /**
44 * Creates a new exception from given message and cause.
45 *
46 * @param message the detail of exception in string
47 * @param cause underlying cause of the error
48 */
49 public InvalidNodeForTranslatorException(final String message, final Throwable cause) {
50 super(message, cause);
51 }
52
53 /**
54 * Creates a new exception from cause.
55 *
56 * @param cause underlying cause of the error
57 */
58 public InvalidNodeForTranslatorException(final Throwable cause) {
59 super(cause);
60 }
61
62 /**
63 * Returns generated file name for the exception.
64 *
65 * @return generated file name for the exception
66 */
67 public String getFileName() {
68 return this.fileName;
69 }
70
71 /**
72 * Sets file name in translator exception.
73 *
74 * @param fileName generated file name
75 */
76 public void setFileName(String fileName) {
77 this.fileName = fileName;
78 }
79}