001/**
002 * Copyright 2017, Digi International Inc.
003 *
004 * This Source Code Form is subject to the terms of the Mozilla Public
005 * License, v. 2.0. If a copy of the MPL was not distributed with this
006 * file, you can obtain one at http://mozilla.org/MPL/2.0/.
007 *
008 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 
009 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 
010 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 
011 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 
012 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 
013 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 
014 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
015 */
016package com.digi.xbee.api.exceptions;
017
018/**
019 * This exception will be thrown when trying to open a non-existing interface.
020 * 
021 * @see ConnectionException
022 */
023public class InvalidInterfaceException extends ConnectionException {
024
025        // Constants
026        private static final long serialVersionUID = 1L;
027        private static final String DEFAULT_MESSAGE = "The connection interface you are trying to access is invalid or does not exist.";
028
029        /**
030         * Creates an {@code InvalidInterfaceException} with 
031         * {@value #DEFAULT_MESSAGE} as its error detail message.
032         */
033        public InvalidInterfaceException() {
034                super(DEFAULT_MESSAGE);
035        }
036        
037        /**
038         * Creates an {@code InvalidInterfaceException} with the specified message.
039         * 
040         * @param message The associated message.
041         */
042        public InvalidInterfaceException(String message) {
043                super(message);
044        }
045        
046        /**
047         * Creates an {@code InvalidInterfaceException} with the specified 
048         * message and cause.
049         * 
050         * @param message The associated message.
051         * @param cause The cause of this exception.
052         * 
053         * @see Throwable
054         */
055        public InvalidInterfaceException(String message, Throwable cause) {
056                super(message, cause);
057        }
058}