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 * Generic XBee API exception. This class and its subclasses indicate
020 * conditions that an application might want to catch. This exception can be 
021 * thrown when any problem related to the XBee device occurs.
022 * 
023 * @see Exception
024 */
025public class XBeeException extends Exception {
026
027        // Constants
028        private static final long serialVersionUID = 1L;
029        
030        /**
031         * Creates an {@code XBeeException} with {@code null} as its error 
032         * detail message.
033         */
034        public XBeeException() {
035                super();
036        }
037        
038        /**
039         * Creates an {@code XBeeException} with the specified cause.
040         * 
041         * @param cause The cause of this exception.
042         * 
043         * @see Throwable
044         */
045        public XBeeException(Throwable cause) {
046                super(cause);
047        }
048
049        /**
050         * Creates an {@code XBeeException} with the specified message.
051         * 
052         * @param message The associated message.
053         */
054        public XBeeException(String message) {
055                super(message);
056        }
057
058        /**
059         * Creates an {@code XBeeException} with the specified message and cause.
060         * 
061         * @param message The associated message.
062         * @param cause The cause of this exception.
063         * 
064         * @see Throwable
065         */
066        public XBeeException(String message, Throwable cause) {
067                super(message, cause);
068        }
069
070        /*
071         * (non-Javadoc)
072         * @see java.lang.Throwable#getCause()
073         */
074        @Override
075        public Throwable getCause() {
076                return super.getCause();
077        }
078}