@@ -595,17 +595,6 @@ var MonoSupportLib = {
595595 if ( ! loaded_cb )
596596 throw new Error ( "loaded_cb not provided" ) ;
597597
598- if ( args . globalization_mode ) {
599- switch ( args . globalization_mode ) {
600- case "icu" :
601- case "invariant" :
602- case "auto" :
603- break ;
604- default :
605- throw new Error ( "Invalid option for globalization_mode: " + args . globalization_mode ) ;
606- }
607- }
608-
609598 var pending = file_list . length + runtime_assets . length ;
610599 var loaded_files = [ ] ;
611600 var loaded_runtime_assets = { } ;
@@ -662,7 +651,7 @@ var MonoSupportLib = {
662651 MONO . loaded_files = loaded_files ;
663652 MONO . loaded_runtime_assets = loaded_runtime_assets ;
664653
665- MONO . _mono_wasm_globalization_init ( args , loaded_runtime_assets ) ;
654+ MONO . _globalization_init ( args , loaded_runtime_assets ) ;
666655
667656 var load_runtime = Module . cwrap ( 'mono_wasm_load_runtime' , null , [ 'string' , 'number' ] ) ;
668657
@@ -710,8 +699,7 @@ var MonoSupportLib = {
710699
711700 onPendingRequestComplete ( ) ;
712701 } catch ( exc ) {
713- console . log ( "Unhandled exception in processFetchResponseBuffer" , exc ) ;
714- throw exc ;
702+ console . log ( "Unhandled exception" , exc ) ;
715703 }
716704 } ;
717705
@@ -733,15 +721,9 @@ var MonoSupportLib = {
733721
734722 attemptNextSource = function ( file_name ) {
735723 if ( sourceIndex >= runtime_asset_sources . length ) {
736- var msg = "MONO-WASM : Failed to load asset: ' " + file_name + "' after attempting all sources" ;
724+ console . log ( "MONO_WASM : Failed to load " + file_name ) ;
737725 -- pending ;
738-
739- if ( MONO . mono_wasm_ignore_asset_load_errors )
740- console . error ( msg ) ;
741- else
742- throw new Error ( msg ) ;
743-
744- return ;
726+ throw new Error ( "MONO-WASM: Failed to load asset: '" + file_name + "' after attempting all sources" ) ;
745727 }
746728
747729 var sourcePrefix = runtime_asset_sources [ sourceIndex ] ;
@@ -768,8 +750,9 @@ var MonoSupportLib = {
768750 // We'll just skip that file and continue (though the 404 is logged in the console).
769751 if ( response . status === 404 && file_name . match ( / \. p d b $ / ) && MONO . mono_wasm_ignore_pdb_load_errors ) {
770752 -- pending ;
771- console . error ( "MONO-WASM: Skipping failed load for .pdb file: '" + file_name + "'" ) ;
772- } else {
753+ throw new Error ( "MONO-WASM: Skipping failed load for .pdb file: '" + file_name + "'" ) ;
754+ }
755+ else {
773756 throw new Error ( "MONO_WASM: Failed to load file: '" + file_name + "'" ) ;
774757 }
775758 }
@@ -786,7 +769,7 @@ var MonoSupportLib = {
786769 } ) ;
787770 } ,
788771
789- _mono_wasm_globalization_init : function ( args , assets ) {
772+ _globalization_init : function ( args , assets ) {
790773 var invariantMode = false ;
791774
792775 if ( args . globalization_mode === "invariant" )
@@ -800,12 +783,12 @@ var MonoSupportLib = {
800783 var mono_wasm_load_icu_data = Module . cwrap ( 'mono_wasm_load_icu_data' , 'number' , [ 'number' ] ) ;
801784 var result = mono_wasm_load_icu_data ( icudt [ 0 ] ) ;
802785 if ( result !== 1 )
803- console . error ( "MONO_WASM: mono_wasm_load_icu_data returned" , result ) ;
786+ console . log ( "MONO_WASM: mono_wasm_load_icu_data returned" , result ) ;
804787 } else if ( args . globalization_mode !== "icu" ) {
805788 console . log ( "MONO_WASM: icudt.dat not present, using invariant globalization mode" ) ;
806789 invariantMode = true ;
807790 } else {
808- console . error ( "MONO_WASM: icudt.dat not found and invariant globalization mode is inactive." ) ;
791+ console . log ( "MONO_WASM: ERROR : icudt.dat not found and invariant globalization mode is inactive." ) ;
809792 }
810793 }
811794
0 commit comments