HIRS/tpm_module/libhis_exception.hpp

48 lines
682 B
C++
Raw Permalink Normal View History

2018-09-06 13:47:33 +00:00
#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