Improved script loading error message handler
parent
cb00b236bb
commit
754ec6b3ab
|
@ -122,6 +122,8 @@ export async function load_multiple(paths: SourcePath[], options: MultipleOption
|
|||
let errorMessage;
|
||||
if(error instanceof LoadSyntaxError)
|
||||
errorMessage = error.source.message;
|
||||
else if(typeof error === "string")
|
||||
errorMessage = error;
|
||||
else
|
||||
errorMessage = "View the browser console for more information!";
|
||||
critical_error("Failed to load script " + script_name(result.failed[0].request, true), errorMessage);
|
||||
|
|
Loading…
Reference in New Issue