Stopped Windows plugin loader from throwing #4661
System error message hidden with 'SetErrorMode(SEM_FAILCRITICALERRORS)'
This commit is contained in:
parent
46527ded56
commit
11a7d2c4c2
|
@ -60,6 +60,9 @@ ArchMiscWindows::cleanup()
|
||||||
void
|
void
|
||||||
ArchMiscWindows::init()
|
ArchMiscWindows::init()
|
||||||
{
|
{
|
||||||
|
// stop windows system error dialogs from showing.
|
||||||
|
SetErrorMode(SEM_FAILCRITICALERRORS);
|
||||||
|
|
||||||
s_dialogs = new Dialogs;
|
s_dialogs = new Dialogs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,8 +60,9 @@ ArchPluginWindows::load()
|
||||||
HINSTANCE library = LoadLibrary(path.c_str());
|
HINSTANCE library = LoadLibrary(path.c_str());
|
||||||
|
|
||||||
if (library == NULL) {
|
if (library == NULL) {
|
||||||
LOG((CLOG_ERR "failed to load plugin: %s %d", (*it).c_str(), GetLastError()));
|
String error = XArchEvalWindows().eval();
|
||||||
throw XArch(new XArchEvalWindows);
|
LOG((CLOG_ERR "failed to load plugin '%s', error: %s", (*it).c_str(), error.c_str()));
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
void* lib = reinterpret_cast<void*>(library);
|
void* lib = reinterpret_cast<void*>(library);
|
||||||
|
|
Loading…
Reference in New Issue