web: Display config parse errors

This commit is contained in:
nosamu 2023-03-21 17:45:48 -05:00 committed by Mike Welsh
parent b2c79f9ea2
commit f97827ef9c
1 changed files with 6 additions and 1 deletions

View File

@ -708,7 +708,12 @@ export class RufflePlayer extends HTMLElement {
}
} catch (e) {
console.error(`Serious error occurred loading SWF file: ${e}`);
throw e;
const err = new Error(e as string);
if (err.message.includes("Error parsing config")) {
err.ruffleIndexError = PanicError.JavascriptConfiguration;
}
this.panic(err);
throw err;
}
}