mirror of
https://github.com/nsacyber/HIRS.git
synced 2025-06-21 08:29:36 +00:00
Initial release
This commit is contained in:
47
tpm_module/libhis_exception.hpp
Normal file
47
tpm_module/libhis_exception.hpp
Normal file
@ -0,0 +1,47 @@
|
||||
#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
|
Reference in New Issue
Block a user