Example #1
0
static void PrintXMPErrorInfo ( const XMP_Error & excep, const char * title )
{
	XMP_Int32 id = excep.GetID();
	const char * message = excep.GetErrMsg();
	fprintf ( sLogFile, "%s\n", title );
	fprintf ( sLogFile, "   #%d : %s\n", id, message );
}
void GenericErrorCallback::NotifyClient ( XMP_ErrorSeverity severity, XMP_Error & error, XMP_StringPtr filePath /*= 0 */ ) const
{
	bool notifyClient = CanNotify() && !error.IsNotified();
	bool returnAndRecover (severity == kXMPErrSev_Recoverable);

	if ( notifyClient ) {
		error.SetNotified();
		notifyClient = CheckLimitAndSeverity ( severity );
		if ( notifyClient ) {
			returnAndRecover &= ClientCallbackWrapper( filePath, severity, error.GetID(), error.GetErrMsg() );
		}
	}

	if ( ! returnAndRecover ) XMP_Error_Throw ( error );

}
Example #3
0
static void set_error(const XMP_Error & e)
{
	set_error(-e.GetID());
	std::cerr << e.GetErrMsg() << std::endl;
}