001/*
002 * Copyright 2019, 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 authenticate over Bluetooth
020 * with an XBee device and there is an error.
021 *
022 * @since 1.3.0
023 */
024public class BluetoothAuthenticationException extends XBeeException {
025
026        // Constants.
027        private static final long serialVersionUID = 1L;
028        private static final String DEFAULT_MESSAGE = "The Bluetooth authentication process failed.";
029
030        /**
031         * Creates a {@code BluetoothAuthenticationException} with a default message
032         * as its error detail message.
033         */
034        public BluetoothAuthenticationException() {
035                super(DEFAULT_MESSAGE);
036        }
037
038        /**
039         * Creates a {@code BluetoothAuthenticationException} with the given cause
040         * of the exception.
041         *
042         * @param cause Cause of the exception.
043         */
044        public BluetoothAuthenticationException(Throwable cause) {
045                super(cause);
046        }
047
048        /**
049         * Creates a {@code BluetoothAuthenticationException} with the given
050         * message.
051         *
052         * @param message Message of the exception.
053         */
054        public BluetoothAuthenticationException(String message) {
055                super(message);
056        }
057
058        /**
059         * Creates a {@code BluetoothAuthenticationException} with the given message
060         * and cause.
061         *
062         * @param message Message of the exception.
063         * @param cause Cause of the exception.
064         */
065        public BluetoothAuthenticationException(String message, Throwable cause) {
066                super(message, cause);
067        }
068}