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 an interface with an
016 * invalid configuration. Usually happens when the XBee device is 
017 * communicating through a serial port.
018 * 
019 * @see ConnectionException
020 */
021public class InvalidConfigurationException extends ConnectionException {
022
023        // Constants
024        private static final long serialVersionUID = 1L;
025        private static final String DEFAULT_MESSAGE = "The configuration used to open the interface is invalid.";
026
027        /**
028         * Creates an {@code InvalidConfigurationException} with 
029         * {@value #DEFAULT_MESSAGE} as its error detail message.
030         */
031        public InvalidConfigurationException() {
032                super(DEFAULT_MESSAGE);
033        }
034        
035        /**
036         * Creates an {@code InvalidConfigurationException} with the specified 
037         * message.
038         * 
039         * @param message The associated message.
040         */
041        public InvalidConfigurationException(String message) {
042                super(message);
043        }
044        
045        /**
046         * Creates an {@code InvalidConfigurationException} with the specified 
047         * message and cause.
048         * 
049         * @param message The associated message.
050         * @param cause The cause of this exception.
051         * 
052         * @see Throwable
053         */
054        public InvalidConfigurationException(String message, Throwable cause) {
055                super(message, cause);
056        }
057}