32 lines
659 B
C
32 lines
659 B
C
|
|
#ifndef __EXCEPT_H
|
||
|
|
#define __EXCEPT_H
|
||
|
|
|
||
|
|
#include <string>
|
||
|
|
#include "anslicensing.h"
|
||
|
|
|
||
|
|
using namespace std;
|
||
|
|
|
||
|
|
class LicensingException : public ANSCENTER::Licensing::Exception {
|
||
|
|
public:
|
||
|
|
LicensingException( int code, const char * message = NULL)
|
||
|
|
{
|
||
|
|
SetCode(code);
|
||
|
|
if (message)
|
||
|
|
SetMessage(message);
|
||
|
|
}
|
||
|
|
|
||
|
|
virtual ~LicensingException() {}
|
||
|
|
|
||
|
|
virtual int GetCode() { return m_code; }
|
||
|
|
virtual const char * GetExceptionMessage() { return m_message.c_str(); }
|
||
|
|
virtual void Destroy() { delete this; }
|
||
|
|
void SetCode(int code) { m_code = code; }
|
||
|
|
void SetMessage(const char * message) { m_message = message; }
|
||
|
|
|
||
|
|
protected:
|
||
|
|
int m_code;
|
||
|
|
string m_message;
|
||
|
|
};
|
||
|
|
|
||
|
|
#endif
|