Exemplo n.º 1
0
/* ---------------------------------------------------------------------- */
void PHRQ_io::
error_msg(const char *err_str, bool stop)
/* ---------------------------------------------------------------------- */
{

	io_error_count++;
	if (error_ostream != NULL && error_on)
	{
		//(*error_ostream) << err_str;
		screen_msg(err_str);
		error_flush();
	}
	if (stop)
	{
		if (error_ostream != NULL && error_on)
		{
			//(*error_ostream) << "Stopping.\n";
			screen_msg("Stopping.\n");
			error_ostream->flush();
		}
		output_msg("Stopping.\n");
		log_msg("Stopping.\n");

		throw PhreeqcStop();
	}
}
Exemplo n.º 2
0
/* ---------------------------------------------------------------------- */
void Phreeqc::
error_msg(const char *err_str, bool stop)
/* ---------------------------------------------------------------------- */
{
	if (get_input_errors() <= 0)
		input_error = 1;
	if (phrq_io)
	{
		std::ostringstream msg;
		msg << "ERROR: " << err_str << "\n";

		phrq_io->output_msg(msg.str().c_str());
		phrq_io->log_msg(msg.str().c_str());

		if (status_on)
		{
			phrq_io->screen_msg("\n");
		}
		status_on = false;
		phrq_io->error_msg(msg.str().c_str(), stop);
	}

	if (stop)
	{
		throw PhreeqcStop();
	}
}