1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
//
// C++ Interface: Exceptions
//
// Description:
//
//
// Author: Rikard Björklind <olof@linux.nu>, (C) 2005
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef EXCEPTIONS_H__
#define EXCEPTIONS_H__
class Exception
{
public:
Exception() : message("") {}
Exception(const char* msg) : message(msg) {}
const char* getMessage() const {return message;}
protected:
const char* message;
};
class IndexOutOfBoundsException : public Exception
{
public:
IndexOutOfBoundsException() : Exception() {}
};
class RpcHandlerException : public Exception
{
public:
RpcHandlerException(const char* aMethodName,const char* aMessage) : Exception(aMessage),methodName(aMethodName) {}
const char* getMethodName() const {return methodName;}
private:
const char* methodName;
};
#endif
|