示例#1
0
void MessageFactory::ErrorAt(Exception& ex, const UCS2 *filename, POV_LONG line, POV_LONG column, POV_LONG offset, const char *format, ...)
{
	va_list marker;

	if (ex.frontendnotified(true))
		throw ex;

	va_start(marker, format);
	SendError(format, marker, filename, line, column, offset);
	va_end(marker);

	throw ex;
}
示例#2
0
void RenderTask::SendFatalError(Exception& e)
{
    // if the front-end has been told about this exception already, we don't tell it again
    if (e.frontendnotified(true))
        return;

    POVMS_Message msg(kPOVObjectClass_ControlData, kPOVMsgClass_ViewOutput, kPOVMsgIdent_Error);

    msg.SetString(kPOVAttrib_EnglishText, e.what());
    msg.SetInt(kPOVAttrib_Error, 0);
    msg.SetInt(kPOVAttrib_ViewId, viewData->GetViewId());
    msg.SetSourceAddress(viewData->GetSceneData()->backendAddress);
    msg.SetDestinationAddress(viewData->GetSceneData()->frontendAddress);

    POVMS_SendMessage(msg);
}
示例#3
0
void MessageFactory::Error(Exception& ex, const char *format, ...)
{
	va_list marker;

	// if the front-end has been told about this exception already, we don't want to tell it again
	// (we presume that the text given by format and its parameters relate to that exception)
	// this form of frontendnotified() sets the notified state of ex
	if (ex.frontendnotified(true))
		throw ex;

	va_start(marker, format);
	SendError(format, marker);
	va_end(marker);

	// Terminate
	throw ex;
}
示例#4
0
void MessageFactory::Error(const Exception& ex, const char *format, ...)
{
	va_list marker;

	// if the front-end has been told about this exception already, we don't want to tell it again
	// (we presume that the text given by format and its parameters relate to that exception)
	// this form of frontendnotified() doesn't change the state of ex
	if (ex.frontendnotified())
		throw ex;

	va_start(marker, format);
	SendError(format, marker);
	va_end(marker);

	// now take a copy of ex and set its notification flag, then throw that.
	pov_base::Exception local_ex(ex);
	local_ex.frontendnotified(true);
	throw local_ex;
}