add an error popup and quit when the web assembly module can't load

This commit is contained in:
martinfouilleul 2023-06-19 14:17:40 +02:00
parent 3ba2488541
commit 0312c7c56a
1 changed files with 16 additions and 0 deletions

View File

@ -321,6 +321,14 @@ void* orca_runloop(void* user)
if(!file)
{
log_error("Couldn't load wasm module at %s\n", modulePathCString);
char* options[] = {"OK"};
mp_alert_popup("Error",
"The application couldn't load: web assembly module not found",
1,
options);
mp_request_quit();
return((void*)-1);
}
@ -362,6 +370,14 @@ void* orca_runloop(void* user)
m3_GetErrorInfo(app->runtime.m3Runtime, &errInfo);
log_error("wasm error: %s\n", errInfo.message);
char* options[] = {"OK"};
mp_alert_popup("Error",
"The application couldn't load: can't compile web assembly module",
1,
options);
mp_request_quit();
return((void*)-1);
}