mirror of
https://github.com/DarkStore-3DS/Project_CTR.git
synced 2026-07-04 16:59:02 +00:00
Move dependencies to the top level.
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
* @file PlatformErrorHandlingUtil.h
|
||||
* @brief Declaration of tc::PlatformErrorHandlingUtil
|
||||
* @author Jack (jakcron)
|
||||
* @version 0.1
|
||||
* @date 2020/04/09
|
||||
**/
|
||||
#pragma once
|
||||
#include <tc/types.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
namespace tc
|
||||
{
|
||||
/**
|
||||
* @class PlatformErrorHandlingUtil
|
||||
* @brief Platform specific error handling utilities.
|
||||
**/
|
||||
class PlatformErrorHandlingUtil
|
||||
{
|
||||
public:
|
||||
#ifdef _WIN32
|
||||
/**
|
||||
* @brief Create a string from Win32 error code.
|
||||
*
|
||||
* @param[in] error Error code, returned from GetLastError().
|
||||
*
|
||||
* @return Error as a localised string.
|
||||
**/
|
||||
static std::string GetLastErrorString(DWORD error);
|
||||
#else
|
||||
/**
|
||||
* @brief Create a string from GNU error number.
|
||||
*
|
||||
* @param[in] errnum Error code, returned from @a errno macro.
|
||||
*
|
||||
* @return Error as a localised string.
|
||||
**/
|
||||
static std::string GetGnuErrorNumString(int errnum);
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
} // namespace tc
|
||||
Reference in New Issue
Block a user