Fawkes API  Fawkes Development Version
shm_exceptions.h
00001 
00002 /***************************************************************************
00003  *  shm_exceptions.h - exceptions thrown in shmem utils, do NOT put your own
00004  *                     application specific exceptions here!
00005  *
00006  *  Created: Thu Feb 09 13:06:52 2006
00007  *  Copyright  2005-2006  Tim Niemueller [www.niemueller.de]
00008  *
00009  ****************************************************************************/
00010 
00011 /*  This program is free software; you can redistribute it and/or modify
00012  *  it under the terms of the GNU General Public License as published by
00013  *  the Free Software Foundation; either version 2 of the License, or
00014  *  (at your option) any later version. A runtime exception applies to
00015  *  this software (see LICENSE.GPL_WRE file mentioned below for details).
00016  *
00017  *  This program is distributed in the hope that it will be useful,
00018  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020  *  GNU Library General Public License for more details.
00021  *
00022  *  Read the full text in the LICENSE.GPL_WRE file in the doc directory.
00023  */
00024 
00025 #ifndef __UTILS_IPC_SHM_EXCEPTIONS_H_
00026 #define __UTILS_IPC_SHM_EXCEPTIONS_H_
00027 
00028 #include <core/exception.h>
00029 
00030 namespace fawkes {
00031 
00032 
00033 class ShmCouldNotAttachException : public Exception
00034 {
00035  public:
00036   ShmCouldNotAttachException(const char *msg);
00037 };
00038 
00039 
00040 class ShmNoHeaderException : public Exception
00041 {
00042  public:
00043   ShmNoHeaderException();
00044 };
00045 
00046 
00047 class ShmInconsistentSegmentSizeException : public Exception
00048 {
00049  public:
00050   ShmInconsistentSegmentSizeException(unsigned int desired_mem, unsigned int act_mem);
00051 };
00052 
00053 
00054 class ShmDoesNotExistException : public Exception
00055 {
00056  public:
00057   ShmDoesNotExistException();
00058 };
00059 
00060 
00061 class ShmCouldNotAttachAddrDepException : public Exception
00062 {
00063  public:
00064   ShmCouldNotAttachAddrDepException();
00065 };
00066 
00067 
00068 class ShmAddrOutOfBoundsException : public Exception
00069 {
00070  public:
00071   ShmAddrOutOfBoundsException();
00072 };
00073 
00074 class ShmPtrOutOfBoundsException : public Exception
00075 {
00076  public:
00077   ShmPtrOutOfBoundsException();
00078 };
00079 
00080 
00081 } // end namespace fawkes
00082 
00083 #endif