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