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