示例#1
0
void LightSpeed::AppBase::handleException()
{
	try {
		try {
			throw;
#if defined _DEBUG || defined DEBUG
		} catch (const Exception &e) {
			exceptionDebugLog(e);
		} catch (const std::exception &e) {
			exceptionDebugLog(StdException(THISLOCATION,e));
		} catch (...) {
			exceptionDebugLog(UnknownException(THISLOCATION));
#else
		} catch (const Exception &e) {
			onException(e);
		} catch (const std::exception &e) {
			onException(StdException(THISLOCATION,e));
		} catch (...) {
			onException(UnknownException(THISLOCATION));
#endif
		}
	} catch (const Exception &e) {
		IApp::exceptionDebug(e,this);
	} catch (const std::exception &e) {
		IApp::exceptionDebug(StdException(THISLOCATION,e),this);
	} catch (...) {
		IApp::exceptionDebug(UnknownException(THISLOCATION),this);
	}
}
示例#2
0
ScriptMessageHandler::ScriptMessageHandler(ScriptPlugin *parent)
{
	m_engine = ScriptTools::engineInstance();
	QObject::connect(m_engine, SIGNAL(signalHandlerException(QScriptValue)),
	                 parent, SLOT(onException(QScriptValue)));
	m_engine->importExtension(QLatin1String("qt.core"));
	m_engine->importExtension(QLatin1String("qt.gui"));
	m_engine->importExtension(QLatin1String("qutim"));
}
示例#3
0
	void Thread::thisThreadRun()
	{
		_isRunning = true;
		try
		{
			run();
		}
		catch(boost::thread_interrupted& ex)
		{
			onInterrupt();
		}
		catch(std::exception& ex)
		{
			onException(ex);
		}
		_isRunning = false;
		_thisThread = boost::thread();
	}