bool SubdomainCreator::CreateSubdomain()
{
	GetAllRequiredData();
	if (PerformDataValidation())
	{
		if (!WriteFort14File())
		{
			FileWriteError("fort.14");
			return false;
		}
		if (!WriteBNListFile())
		{
			FileWriteError("bnlist.14");
			return false;
		}
		if (!WritePy140File())
		{
			FileWriteError("py.140");
			return false;
		}
		if (!WritePy141File())
		{
			FileWriteError("py.141");
			return false;
		}
		return true;
	}
	return false;
}
Beispiel #2
0
  void bz2ofstream::close()
  {
    if (f)
    {
      bool write_error = !bzClose();

      fclose(f);
      f = NULL;

      if (write_error)
        throw FileWriteError(bz2_filename);
    }
  }
Beispiel #3
0
void WOFile::WriteBuffer(const void* pBuffer, unsigned int uiBufferSize)
{
	if(!m_File)
	{
		throw FileError("NULL File pointer", EL_BAD, "WOFile::WriteBuffer", "File hasn't been opened!");
	}

	fwrite(pBuffer, uiBufferSize, 1, m_File);
	if(ferror(m_File))
	{
		throw FileWriteError(m_sFilename, EL_GENERAL, "WOFile::WriteBuffer", "Error while writing file:\r\n" + m_sFilename);
	}
}
Beispiel #4
0
  void gzofstream::close()
  {
    if (f)
    {
      bool write_error = !gzClose();

      fclose(f);
      f = NULL;

      if (write_error)
        throw FileWriteError(gz_filename);
    }
  }
Beispiel #5
0
    void ConnectedLogFile::writeln(const std::string& message)
    {
      std::future<std::unique_ptr<prot::Receivable>> recv
        = connection.send(prot::Message(message, *file));
      recv.wait();
      recv.get()->act(*this);

      if (!error_string.empty())
      {
        std::string current_error_string;
        std::swap(current_error_string, error_string);
        throw FileWriteError(file_path, current_error_string);
      }
    }