Пример #1
0
/**
 *	Output the exception if it has not occurred before, otherwise only
 *	output the exception if the minimum period has elapsed since the
 *	last outputting of this exception.
 *
 *	@param ne 		the NubException
 *	@param prefix 	any prefix to add to the error message, or NULL if no prefix
 *
 */
void ErrorReporter::reportException(const NubException & ne, const char* prefix)
{
	Address offender(0, 0);
	ne.getAddress(offender);

	if (prefix)
	{
		this->reportError(offender,
			"%s: Exception occurred: %s",
			prefix, reasonToString(ne.reason()));
	}
	else
	{
		this->reportError(offender, "Exception occurred: %s",
				reasonToString(ne.reason()));
	}
}
/**
 * 	This method handles exceptions from Mercury.
 */
inline void BlockingReplyHandler::handleException(
		const NubException & ex, void * )
{
	if (err_ == REASON_SUCCESS)
	{
		err_ = ex.reason();
	}

	nub_.breakProcessing();
	isDone_ = true;
}