Revenge/entry.js
Amsyar Rasyiq 7dc0b1286a
[Init] Implement error dialog for failed mod loading (#37)
* [Main] Implement error dialog for failed mod loading

* [Main] Initialize Vendetta from entry.js
2023-03-15 16:36:12 +00:00

18 lines
No EOL
542 B
JavaScript

// This logs in the native logging implementation, e.g. logcat
console.log("Hello from Vendetta!");
(async () => {
try {
await (await import("./src/index.ts")).default();
} catch (ex) {
const dialog = [
"Failed to load Vendetta!\n",
`Build Number: ${nativeModuleProxy.InfoDictionaryManager.Build}`,
`Vendetta: ${__vendettaVersion}`,
ex?.stack || ex.toString(),
].join("\n");
alert(dialog);
console.error(ex?.stack || ex.toString());
}
})();