Files
ANSCORE/core/anslicensing/except.h

32 lines
659 B
C
Raw Normal View History

2026-03-28 16:54:11 +11:00
#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