Esempio n. 1
0
void Plugin::ExecuteFunction(ExecuteStruct& es, const std::function<void()>& f)
{
	Prologue();
	++Activity;
	try
	{
		f();
	}
	catch (SException &e)
	{
		if (ProcessSEHException(this, m_model->GetExportName(es.id), e.GetInfo()))
		{
			m_model->GetOwner()->UnloadPlugin(this, es.id);
			es.Result = es.Default;
			Global->ProcessException=FALSE;
		}
		else
		{
			throw;
		}
	}
	catch (std::exception &e)
	{
		if (ProcessStdException(e, this, m_model->GetExportName(es.id)))
		{
			m_model->GetOwner()->UnloadPlugin(this, es.id);
			es.Result = es.Default;
			Global->ProcessException = FALSE;
		}
		else
		{
			throw;
		}
	}
	--Activity;
	Epilogue();
}
Esempio n. 2
0
// for Far
inline bool ProcessSEHException(const wchar_t* function, EXCEPTION_POINTERS *xp) { return ProcessSEHException(nullptr, function, xp); }