Rework PCEPDeserializerException and move it into SPI
[bgpcep.git] / pcep / spi / src / main / java / org / opendaylight / protocol / pcep / spi / PCEPDeserializerException.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, 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 package org.opendaylight.protocol.pcep.spi;
9
10 /**
11  * Used when something occurs during parsing bytes to java objects.
12  */
13 public class PCEPDeserializerException extends Exception {
14         private static final long serialVersionUID = 1L;
15
16         /**
17          * Used when no exact error (from rfc or from draft) is specified.
18          *
19          * @param err
20          *            error message describing the error that occurred
21          */
22         public PCEPDeserializerException(final String err) {
23                 super(err);
24         }
25
26         /**
27          * Used when we want to pass also the exception that occurred.
28          *
29          * @param err
30          *            error message describing the error that occurred
31          * @param e
32          *            specific exception that occurred
33          */
34         public PCEPDeserializerException(final String err, final Throwable e) {
35                 super(err, e);
36         }
37 }