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;
}
Exemple #2
0
 SystemError::SystemError(const boost::format& format)
     : Exception(format)
 {
     *this << ErrorInfo_SystemErrorCode(GetSystemErrorCode());
 }
Exemple #3
0
 SystemError::SystemError(const std::string& message)
     : Exception(message)
 {
     *this << ErrorInfo_SystemErrorCode(GetSystemErrorCode());
 }
Exemple #4
0
 SystemError::SystemError()
 {
     *this << ErrorInfo_SystemErrorCode(GetSystemErrorCode());
 }