blob: e0cd54cda628659b2d11cf5039d15ce1e4bec77b [file] [log] [blame]
Yi Tsengf4e13e32017-03-30 15:38:39 -07001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2017-present Open Networking Foundation
Yi Tsengf4e13e32017-03-30 15:38:39 -07003 *
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.vpls.api;
18
19/**
20 * Exception for VPLS operation.
21 */
22public class VplsOperationException extends RuntimeException {
23 private static final long serialVersionUID = 4514685940685335886L;
24 private VplsOperation vplsOperation;
25
26 /**
27 * Constructs a VPLS operation exception with given VPLS operation and
28 * message.
29 *
30 * @param operation the VPLS operation
31 * @param msg the description of the exception
32 */
33 public VplsOperationException(VplsOperation operation, String msg) {
34 super(msg);
35 this.vplsOperation = operation;
36 }
37
38 /**
39 * Gets VPLS operation for this exception.
40 * @return the VPLS operation
41 */
42 public VplsOperation vplsOperation() {
43 return vplsOperation;
44 }
45}