001/**
002 * Copyright (c) 2014-2015 Digi International Inc.,
003 * All rights not expressly granted are reserved.
004 *
005 * This Source Code Form is subject to the terms of the Mozilla Public
006 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
007 * You can obtain one at http://mozilla.org/MPL/2.0/.
008 *
009 * Digi International Inc. 11001 Bren Road East, Minnetonka, MN 55343
010 * =======================================================================
011 */
012package com.digi.xbee.api.exceptions;
013
014/**
015 * This exception will be thrown when trying to open a non-existing interface.
016 * 
017 * @see ConnectionException
018 */
019public class InvalidInterfaceException extends ConnectionException {
020
021        // Constants
022        private static final long serialVersionUID = 1L;
023        private static final String DEFAULT_MESSAGE = "The connection interface you are trying to access is invalid or does not exist.";
024
025        /**
026         * Creates an {@code InvalidInterfaceException} with 
027         * {@value #DEFAULT_MESSAGE} as its error detail message.
028         */
029        public InvalidInterfaceException() {
030                super(DEFAULT_MESSAGE);
031        }
032        
033        /**
034         * Creates an {@code InvalidInterfaceException} with the specified message.
035         * 
036         * @param message The associated message.
037         */
038        public InvalidInterfaceException(String message) {
039                super(message);
040        }
041        
042        /**
043         * Creates an {@code InvalidInterfaceException} with the specified 
044         * message and cause.
045         * 
046         * @param message The associated message.
047         * @param cause The cause of this exception.
048         * 
049         * @see Throwable
050         */
051        public InvalidInterfaceException(String message, Throwable cause) {
052                super(message, cause);
053        }
054}