Skip to content

Commit f97827e

Browse files
n0samuHerschel
authored andcommitted
web: Display config parse errors
1 parent b2c79f9 commit f97827e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

web/packages/core/src/ruffle-player.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,12 @@ export class RufflePlayer extends HTMLElement {
708708
}
709709
} catch (e) {
710710
console.error(`Serious error occurred loading SWF file: ${e}`);
711-
throw e;
711+
const err = new Error(e as string);
712+
if (err.message.includes("Error parsing config")) {
713+
err.ruffleIndexError = PanicError.JavascriptConfiguration;
714+
}
715+
this.panic(err);
716+
throw err;
712717
}
713718
}
714719

0 commit comments

Comments
 (0)