mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-25 02:06:04 +02:00
added Error::last()
This commit is contained in:
@@ -19,12 +19,18 @@
|
||||
#include "Poco/Error.h"
|
||||
#include <string>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
|
||||
|
||||
#ifdef POCO_OS_FAMILY_WINDOWS
|
||||
DWORD Error::last()
|
||||
{
|
||||
return GetLastError();
|
||||
}
|
||||
|
||||
|
||||
std::string Error::getMessage(DWORD errorCode)
|
||||
{
|
||||
@@ -44,6 +50,11 @@ namespace Poco {
|
||||
}
|
||||
|
||||
#else
|
||||
int Error::last()
|
||||
{
|
||||
return errno;
|
||||
}
|
||||
|
||||
|
||||
std::string Error::getMessage(int errorCode)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user