Bugzilla – Bug 227
GetLastError for Unix-like implementation
Last modified: 2009-05-28 13:10:44
You need to log in before you can comment on or make changes to this bug.
For win32 implementation exception contains windows get last error rather that for unix-like implementation. It would be good add (for example) last error to exception for unix-like implementation. For example SharedSemaphore has two implementation: for win32 and others. Win32 implementation: void SharedSemaphore::createHandle() { .... if (!m_hSemaphore){ throw SystemException ( boost::format( "Unable to create a shared semaphore '%1%': %2%") %m_nId %getLastWindowsError() ); } } Unix-like implementations void SharedSemaphore::createHandle() { .... if (m_hSemaphore == -1){ throw SystemException ( boost::format( "Unable to create a shared semaphore '%1%'") %m_nId ); } }
Portable getLastOSErrorString() (instead getLastWindowsError()) has been added.