mirror of
https://github.com/nsacyber/HIRS.git
synced 2024-12-30 09:49:00 +00:00
48 lines
682 B
C++
48 lines
682 B
C++
|
#ifndef libhis_exception_hpp
|
||
|
#define libhis_exception_hpp
|
||
|
|
||
|
|
||
|
#ifdef WINDOWS
|
||
|
#include <exception>
|
||
|
using namespace std;
|
||
|
|
||
|
class libhis_exception : public exception
|
||
|
{
|
||
|
public:
|
||
|
libhis_exception(const char *message, int value) : exception(message)
|
||
|
{
|
||
|
result = value;
|
||
|
}
|
||
|
|
||
|
int result;
|
||
|
};
|
||
|
#endif
|
||
|
|
||
|
#ifdef LINUX
|
||
|
#include <exception>
|
||
|
#include <string>
|
||
|
using namespace std;
|
||
|
|
||
|
class libhis_exception
|
||
|
{
|
||
|
public:
|
||
|
libhis_exception(string inmessage, int value)
|
||
|
{
|
||
|
message = inmessage;
|
||
|
result = value;
|
||
|
}
|
||
|
|
||
|
~libhis_exception() {}
|
||
|
|
||
|
string what()
|
||
|
{
|
||
|
return message;
|
||
|
}
|
||
|
|
||
|
int result;
|
||
|
string message;
|
||
|
};
|
||
|
#endif
|
||
|
|
||
|
#endif
|