Improved Error system
Former-commit-id: ddd08841d30575713f4a28ac02566f92791e5539
This commit is contained in:
@@ -12,7 +12,7 @@ NzSemaphoreImpl::NzSemaphoreImpl(unsigned int count)
|
||||
{
|
||||
m_semaphore = CreateSemaphore(nullptr, count, std::numeric_limits<LONG>::max(), nullptr);
|
||||
if (!m_semaphore)
|
||||
NazaraError("Failed to create semaphore: " + NzGetLastSystemError());
|
||||
NazaraError("Failed to create semaphore: " + NzError::GetLastSystemError());
|
||||
}
|
||||
|
||||
NzSemaphoreImpl::~NzSemaphoreImpl()
|
||||
@@ -31,7 +31,7 @@ void NzSemaphoreImpl::Post()
|
||||
{
|
||||
#if NAZARA_CORE_SAFE
|
||||
if (!ReleaseSemaphore(m_semaphore, 1, nullptr))
|
||||
NazaraError("Failed to release semaphore: " + NzGetLastSystemError());
|
||||
NazaraError("Failed to release semaphore: " + NzError::GetLastSystemError());
|
||||
#else
|
||||
ReleaseSemaphore(m_semaphore, 1, nullptr);
|
||||
#endif
|
||||
@@ -41,7 +41,7 @@ void NzSemaphoreImpl::Wait()
|
||||
{
|
||||
#if NAZARA_CORE_SAFE
|
||||
if (WaitForSingleObject(m_semaphore, INFINITE) == WAIT_FAILED)
|
||||
NazaraError("Failed to wait for semaphore: " + NzGetLastSystemError());
|
||||
NazaraError("Failed to wait for semaphore: " + NzError::GetLastSystemError());
|
||||
#else
|
||||
WaitForSingleObject(m_semaphore, INFINITE);
|
||||
#endif
|
||||
@@ -53,7 +53,7 @@ bool NzSemaphoreImpl::Wait(nzUInt32 timeout)
|
||||
DWORD result = WaitForSingleObject(m_semaphore, timeout);
|
||||
if (result == WAIT_FAILED)
|
||||
{
|
||||
NazaraError("Failed to wait for semaphore: " + NzGetLastSystemError());
|
||||
NazaraError("Failed to wait for semaphore: " + NzError::GetLastSystemError());
|
||||
return false;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user