static void translate_exception(const Exception &e)
{
    stringstream s;
    s << endl << e.file() << "(" << e.line() << "): " << e.msg();
    BOOST_ERROR(s.str().c_str());
    for(const Exception &ex: e.causes())
        translate_exception(ex);
}
示例#2
0
void	DefuzemeApplication::displayException(const Exception& e) throw()
{
	if (!speedControl.isActive())
	{
		speedControl.setSingleShot(true);
		speedControl.start(5000);
		QMessageBox::critical(NULL, "defuze.me", "An fatal error occurred while running defuze.me.<br><i>" +
							  e.msg() + " (error " + e.hexCode() +
							  ")</i><br><br>Get online support about this error <a href='http://defuze.me/support/errors/" +
							  e.hexCode() + "?report=run'>here</a>.");
	}
}
示例#3
0
bool DigiDoc::parseException( const Exception &e, QStringList &causes,
	Exception::ExceptionCode &code, int &ddocError )
{
	causes << QString( "%1:%2 %3").arg( QFileInfo(from(e.file())).fileName() ).arg( e.line() ).arg( from(e.msg()) );
	if( e.code() & Exception::DDocError )
		ddocError = e.code() & ~Exception::DDocError;
	switch( e.code() )
	{
	case Exception::CertificateRevoked:
	case Exception::CertificateUnknown:
	case Exception::OCSPTimeSlot:
	case Exception::OCSPRequestUnauthorized:
	case Exception::PINCanceled:
	case Exception::PINFailed:
	case Exception::PINIncorrect:
	case Exception::PINLocked:
		code = e.code();
	default: break;
	}
	Q_FOREACH( const Exception &c, e.causes() )
		if( !parseException( c, causes, code, ddocError ) )
			return false;
	return true;
}
示例#4
0
文件: log.cpp 项目: 2php/mp4v2
/**
 * Log an Exception as an error
 *
 * @param x the exception to log
 */
void
Log::errorf ( const Exception&      x )
{
    this->printf(MP4_LOG_ERROR,"%s",x.msg().c_str());
}