Skip to content

Commit 6503d83

Browse files
committed
Disable stop-the-world windows error messages
1 parent 5f28081 commit 6503d83

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

.travis-ci.sh

-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ elif [ "$TASK" = "windows" ]; then
7373
fi
7474
# Build the lua backend but disable it by default to avoid scary error messages
7575
make -C backends lua.dll
76-
mv backends/lua.dll backends/lua.dll.disabled
7776
travis_fold end "make_windows"
7877
if [ "$(git describe)" == "$(git describe --abbrev=0)" ]; then
7978
travis_fold start "deploy_windows"

midimonster.c

+3
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,9 @@ static int platform_initialize(){
284284
if(WSAStartup(version, &wsa)){
285285
return 1;
286286
}
287+
288+
unsigned error_mode = SetErrorMode(0);
289+
SetErrorMode(error_mode | SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX);
287290
#endif
288291
return 0;
289292
}

plugin.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ static int plugin_attach(char* path, char* file){
5151
char* error = NULL;
5252
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
5353
NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &error, 0, NULL);
54-
fprintf(stderr, "Failed to load plugin %s: %s\n", lib, error);
54+
fprintf(stderr, "Failed to load plugin %s, check that all supporting libraries are present: %s\n", lib, error);
5555
LocalFree(error);
5656
#else
5757
fprintf(stderr, "Failed to load plugin %s: %s\n", lib, dlerror());

0 commit comments

Comments
 (0)