|
|
|
@ -183,9 +183,10 @@ int PluginsManager::loadPlugin(const TCHAR *pluginFilePath, vector<generic_strin
|
|
|
|
|
|
|
|
|
|
_pluginInfos.push_back(pi);
|
|
|
|
|
return (_pluginInfos.size() - 1);
|
|
|
|
|
}
|
|
|
|
|
catch(generic_string s)
|
|
|
|
|
{
|
|
|
|
|
} catch(std::exception e) {
|
|
|
|
|
::MessageBoxA(NULL, e.what(), "Exception", MB_OK);
|
|
|
|
|
return -1;
|
|
|
|
|
} catch(generic_string s) {
|
|
|
|
|
s += TEXT("\n\n");
|
|
|
|
|
s += USERMSG;
|
|
|
|
|
if (::MessageBox(NULL, s.c_str(), pluginFilePath, MB_YESNO) == IDYES)
|
|
|
|
@ -194,9 +195,7 @@ int PluginsManager::loadPlugin(const TCHAR *pluginFilePath, vector<generic_strin
|
|
|
|
|
}
|
|
|
|
|
delete pi;
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
catch(...)
|
|
|
|
|
{
|
|
|
|
|
} catch(...) {
|
|
|
|
|
generic_string msg = TEXT("Fail loaded");
|
|
|
|
|
msg += TEXT("\n\n");
|
|
|
|
|
msg += USERMSG;
|
|
|
|
@ -370,6 +369,8 @@ void PluginsManager::runPluginCommand(size_t i)
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
_pluginsCommands[i]._pFunc();
|
|
|
|
|
} catch(std::exception e) {
|
|
|
|
|
::MessageBoxA(NULL, e.what(), "Exception", MB_OK);
|
|
|
|
|
} catch (...) {
|
|
|
|
|
TCHAR funcInfo[128];
|
|
|
|
|
generic_sprintf(funcInfo, TEXT("runPluginCommand(size_t i : %d)"), i);
|
|
|
|
@ -390,6 +391,8 @@ void PluginsManager::runPluginCommand(const TCHAR *pluginName, int commandID)
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
_pluginsCommands[i]._pFunc();
|
|
|
|
|
} catch(std::exception e) {
|
|
|
|
|
::MessageBoxA(NULL, e.what(), "Exception", MB_OK);
|
|
|
|
|
} catch (...) {
|
|
|
|
|
TCHAR funcInfo[128];
|
|
|
|
|
generic_sprintf(funcInfo, TEXT("runPluginCommand(const TCHAR *pluginName : %s, int commandID : %d)"), pluginName, commandID);
|
|
|
|
@ -411,6 +414,8 @@ void PluginsManager::notify(SCNotification *notification)
|
|
|
|
|
SCNotification scNotif = *notification;
|
|
|
|
|
try {
|
|
|
|
|
_pluginInfos[i]->_pBeNotified(&scNotif);
|
|
|
|
|
} catch(std::exception e) {
|
|
|
|
|
::MessageBoxA(NULL, e.what(), "Exception", MB_OK);
|
|
|
|
|
} catch (...) {
|
|
|
|
|
TCHAR funcInfo[128];
|
|
|
|
|
generic_sprintf(funcInfo, TEXT("notify(SCNotification *notification) : \r notification->nmhdr.code == %d\r notification->nmhdr.hwndFrom == %d\r notification->nmhdr.idFrom == %d"),\
|
|
|
|
@ -429,6 +434,8 @@ void PluginsManager::relayNppMessages(UINT Message, WPARAM wParam, LPARAM lParam
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
_pluginInfos[i]->_pMessageProc(Message, wParam, lParam);
|
|
|
|
|
} catch(std::exception e) {
|
|
|
|
|
::MessageBoxA(NULL, e.what(), "Exception", MB_OK);
|
|
|
|
|
} catch (...) {
|
|
|
|
|
TCHAR funcInfo[128];
|
|
|
|
|
generic_sprintf(funcInfo, TEXT("relayNppMessages(UINT Message : %d, WPARAM wParam : %d, LPARAM lParam : %d)"), Message, wParam, lParam);
|
|
|
|
@ -452,6 +459,8 @@ bool PluginsManager::relayPluginMessages(UINT Message, WPARAM wParam, LPARAM lPa
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
_pluginInfos[i]->_pMessageProc(Message, wParam, lParam);
|
|
|
|
|
} catch(std::exception e) {
|
|
|
|
|
::MessageBoxA(NULL, e.what(), "Exception", MB_OK);
|
|
|
|
|
} catch (...) {
|
|
|
|
|
TCHAR funcInfo[128];
|
|
|
|
|
generic_sprintf(funcInfo, TEXT("relayPluginMessages(UINT Message : %d, WPARAM wParam : %d, LPARAM lParam : %d)"), Message, wParam, lParam);
|
|
|
|
|