diff --git a/src/Nazara/Core/Posix/DirectoryImpl.cpp b/src/Nazara/Core/Posix/DirectoryImpl.cpp index 4ca449d6b..1af975b3f 100644 --- a/src/Nazara/Core/Posix/DirectoryImpl.cpp +++ b/src/Nazara/Core/Posix/DirectoryImpl.cpp @@ -45,7 +45,7 @@ bool NzDirectoryImpl::NextResult() else { if (errno != ENOENT) - NazaraError("Unable to get next result: " + NzGetLastSystemError()); + NazaraError("Unable to get next result: " + NzError::GetLastSystemError()); return false; } @@ -56,7 +56,7 @@ bool NzDirectoryImpl::Open(const NzString& dirPath) m_handle = opendir(dirPath.GetConstBuffer()); if (!m_handle) { - NazaraError("Unable to open directory: " + NzGetLastSystemError()); + NazaraError("Unable to open directory: " + NzError::GetLastSystemError()); return false; } @@ -87,7 +87,7 @@ NzString NzDirectoryImpl::GetCurrent() if (getcwd(path, _PC_PATH_MAX)) currentPath = path; else - NazaraError("Unable to get current directory: " + NzGetLastSystemError()); + NazaraError("Unable to get current directory: " + NzError::GetLastSystemError()); delete[] path; diff --git a/src/Nazara/Core/Posix/FileImpl.cpp b/src/Nazara/Core/Posix/FileImpl.cpp index 60fbb8765..645072c6f 100644 --- a/src/Nazara/Core/Posix/FileImpl.cpp +++ b/src/Nazara/Core/Posix/FileImpl.cpp @@ -39,7 +39,7 @@ bool NzFileImpl::EndOfFile() const void NzFileImpl::Flush() { if (fsync(m_fileDescriptor) == -1) - NazaraError("Unable to flush file: " + NzGetLastSystemError()); + NazaraError("Unable to flush file: " + NzError::GetLastSystemError()); } nzUInt64 NzFileImpl::GetCursorPos() const @@ -143,7 +143,7 @@ bool NzFileImpl::Copy(const NzString& sourcePath, const NzString& targetPath) int fd1 = open64(sourcePath.GetConstBuffer(), O_RDONLY); if (fd1 == -1) { - NazaraError("Fail to open input file (" + sourcePath + "): " + NzGetLastSystemError()); + NazaraError("Fail to open input file (" + sourcePath + "): " + NzError::GetLastSystemError()); return false; } @@ -151,7 +151,7 @@ bool NzFileImpl::Copy(const NzString& sourcePath, const NzString& targetPath) int fd2 = open64(targetPath.GetConstBuffer(), O_WRONLY | O_TRUNC, permissions); if (fd2 == -1) { - NazaraError("Fail to open output file (" + targetPath + "): " + NzGetLastSystemError()); // TODO: more info ? + NazaraError("Fail to open output file (" + targetPath + "): " + NzError::GetLastSystemError()); // TODO: more info ? close(fd1); return false; } @@ -165,7 +165,7 @@ bool NzFileImpl::Copy(const NzString& sourcePath, const NzString& targetPath) { close(fd1); close(fd2); - NazaraError("An error occured from copy : " + NzGetLastSystemError()); + NazaraError("An error occured from copy : " + NzError::GetLastSystemError()); return false; } write(fd2,buffer,bytes); @@ -185,7 +185,7 @@ bool NzFileImpl::Delete(const NzString& filePath) return true; else { - NazaraError("Failed to delete file (" + filePath + "): " + NzGetLastSystemError()); + NazaraError("Failed to delete file (" + filePath + "): " + NzError::GetLastSystemError()); return false; } } @@ -238,7 +238,7 @@ bool NzFileImpl::Rename(const NzString& sourcePath, const NzString& targetPath) return true; else { - NazaraError("Unable to rename file: " + NzGetLastSystemError()); + NazaraError("Unable to rename file: " + NzError::GetLastSystemError()); return false; } } diff --git a/src/Nazara/Core/Posix/SemaphoreImpl.cpp b/src/Nazara/Core/Posix/SemaphoreImpl.cpp index c948b6f30..1b0264a45 100644 --- a/src/Nazara/Core/Posix/SemaphoreImpl.cpp +++ b/src/Nazara/Core/Posix/SemaphoreImpl.cpp @@ -12,7 +12,7 @@ NzSemaphoreImpl::NzSemaphoreImpl(unsigned int count) { if(sem_init(&m_semaphore, 0, count) != 0) - 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 (sem_post(&m_semaphore)==-1) - NazaraError("Failed to release semaphore: " + NzGetLastSystemError()); + NazaraError("Failed to release semaphore: " + NzError::GetLastSystemError()); #else sem_post(&m_semaphore); #endif @@ -41,7 +41,7 @@ void NzSemaphoreImpl::Wait() { #if NAZARA_CORE_SAFE if (sem_wait(&m_semaphore) == -1 ) - NazaraError("Failed to wait for semaphore: " + NzGetLastSystemError()); + NazaraError("Failed to wait for semaphore: " + NzError::GetLastSystemError()); #else sem_wait(&m_semaphore); #endif @@ -60,7 +60,7 @@ bool NzSemaphoreImpl::Wait(nzUInt32 timeout) #if NAZARA_CORE_SAFE if (sem_timedwait(&m_semaphore, &ti) != 0) { - NazaraError("Failed to wait for semaphore: " + NzGetLastSystemError()); + NazaraError("Failed to wait for semaphore: " + NzError::GetLastSystemError()); return false; } diff --git a/src/Nazara/Core/Posix/ThreadImpl.cpp b/src/Nazara/Core/Posix/ThreadImpl.cpp index f1e1f08a1..006a02d09 100644 --- a/src/Nazara/Core/Posix/ThreadImpl.cpp +++ b/src/Nazara/Core/Posix/ThreadImpl.cpp @@ -13,7 +13,7 @@ NzThreadImpl::NzThreadImpl(NzFunctor* functor) { int error = pthread_create(&m_handle, nullptr, &NzThreadImpl::ThreadProc, functor); if (error != 0) - NazaraInternalError("Failed to create thread: " + NzGetLastSystemError()); + NazaraInternalError("Failed to create thread: " + NzError::GetLastSystemError()); } void NzThreadImpl::Detach()