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 any problem related to the communication 020 * with the XBee device occurs. 021 * 022 * @see XBeeException 023 */ 024public class CommunicationException extends XBeeException { 025 026 // Constants 027 private static final long serialVersionUID = 1L; 028 029 /** 030 * Creates a {@code CommunicationException} with {@code null} as its error 031 * detail message. 032 */ 033 public CommunicationException() { 034 super(); 035 } 036 037 /** 038 * Creates a {@code CommunicationException} with the specified cause. 039 * 040 * @param cause The cause of this exception. 041 * 042 * @see Throwable 043 */ 044 public CommunicationException(Throwable cause) { 045 super(cause); 046 } 047 048 /** 049 * Creates a {@code CommunicationException} with the specified message. 050 * 051 * @param message The associated message. 052 */ 053 public CommunicationException(String message) { 054 super(message); 055 } 056 057 /** 058 * Creates a {@code CommunicationException} with the specified message and 059 * cause. 060 * 061 * @param message The associated message. 062 * @param cause The cause of this exception. 063 * 064 * @see Throwable 065 */ 066 public CommunicationException(String message, Throwable cause) { 067 super(message, cause); 068 } 069}