You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Better message when a side module needs exceptions (#9698)
The main module needs to be built with exceptions support for a side module to
use it, both for system libs and for the current JS support. This informs users
they need to do that if a side module throws and the main wasn't built properly
to support that.
Helps #9691
Copy file name to clipboardExpand all lines: src/parseTools.js
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1320,11 +1320,13 @@ function makeStructuralReturn(values, inAsm) {
1320
1320
}
1321
1321
1322
1322
functionmakeThrow(what){
1323
-
if(ASSERTIONS){
1324
-
return'throw '+what+(DISABLE_EXCEPTION_CATCHING==1 ? ' + " - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch."' : '')+';';
1325
-
}else{
1326
-
return'throw '+what+';';
1323
+
if(ASSERTIONS&&DISABLE_EXCEPTION_CATCHING==1){
1324
+
what+=' + " - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch."';
1325
+
if(MAIN_MODULE){
1326
+
what+=' + " (note: in dynamic linking, if a side module wants exceptions, the main module must be built with that support)"';
0 commit comments