Files
yttrium-virtio-gpu/NetKVM/CoInstaller/Exception.h
T
Konstantin Kostiuk e6546dc358 RHEL-65784: Fix files ending
clang-format always check one \n at the end of file.

Jira: https://issues.redhat.com/browse/RHEL-65784

Signed-off-by: Konstantin Kostiuk <[email protected]>
2024-11-20 15:48:35 +02:00

65 lines
1.7 KiB
C++

#pragma once
#include "tstrings.h"
using std::exception;
class neTKVMException : public exception
{
public:
neTKVMException();
neTKVMException(LPCTSTR lpzMessage);
neTKVMException(const tstring &Message);
neTKVMException(const neTKVMException &Other);
virtual ~neTKVMException();
virtual const char *what() const;
virtual LPCTSTR twhat() const;
protected:
void SetMessage(const tstring &Message);
private:
tstring m_Message;
string m_MBCSMessage;
};
class neTKVMNumErrorException : public neTKVMException
{
public:
neTKVMNumErrorException(LPCTSTR lpzDescription, DWORD dwErrorCode);
neTKVMNumErrorException(const tstring &Description, DWORD dwErrorCode);
neTKVMNumErrorException(const neTKVMNumErrorException& Other);
DWORD GetErrorCode(void) { return m_dwErrorCode; }
protected:
DWORD m_dwErrorCode;
};
class neTKVMCRTErrorException : public neTKVMNumErrorException
{
public:
neTKVMCRTErrorException(int nErrorCode = errno);
neTKVMCRTErrorException(LPCTSTR lpzDescription, int nErrorCode = errno);
neTKVMCRTErrorException(const tstring &Description, int nErrorCode = errno);
neTKVMCRTErrorException(const neTKVMCRTErrorException &Other);
protected:
static tstring GetErrorString(DWORD dwErrorCode);
};
#ifdef WIN32
class neTKVMW32ErrorException : public neTKVMNumErrorException
{
public:
neTKVMW32ErrorException(DWORD dwErrorCode = GetLastError());
neTKVMW32ErrorException(LPCTSTR lpzDescription, DWORD dwErrorCode = GetLastError());
neTKVMW32ErrorException(const tstring &Description, DWORD dwErrorCode = GetLastError());
neTKVMW32ErrorException(const neTKVMW32ErrorException &Other);
protected:
static tstring GetErrorString(DWORD dwErrorCode);
};
#endif