bool CIOThread::DoWrite(const char* pBuffer, int64_t len) { auto written = m_pFile->write(pBuffer, len); if (written == len) { return true; } auto err = GetSystemErrorCode(); std::wstring const error = fz::to_wstring(GetSystemErrorDescription(err)); fz::scoped_lock locker(m_mutex); m_error_description = error; return false; }
SystemError::SystemError(const boost::format& format) : Exception(format) { *this << ErrorInfo_SystemErrorCode(GetSystemErrorCode()); }
SystemError::SystemError(const std::string& message) : Exception(message) { *this << ErrorInfo_SystemErrorCode(GetSystemErrorCode()); }
SystemError::SystemError() { *this << ErrorInfo_SystemErrorCode(GetSystemErrorCode()); }