git ssb

1+

Daan Patchwork / manyverse



Commit 84d5230dc300e5523a7e176cfd37ccfc7bfe7ff5

ux: improve crash detection and reporting

Andre Staltz committed on 10/31/2019, 8:35:47 PM
Parent: f3225b817c0dc3939d484304759046d177a57fe5

Files changed

src/backend/loader.tschanged
src/backend/loader.tsView
@@ -17,8 +17,15 @@
1717 process.env = process.env || {};
1818 // process.env.CHLORIDE_JS = 'yes';
1919
2020 // Report JS backend crashes to Java, and in turn, to ACRA
21+process.on('unhandledRejection', (reason, _promise) => {
22+ rnBridge.channel.post('exception', reason);
23+ console.error(reason);
24+ setTimeout(() => {
25+ process.exit(1);
26+ });
27+});
2128 process.on('uncaughtException', err => {
2229 if (typeof err === 'string') {
2330 rnBridge.channel.post('exception', err);
2431 } else {

Built with git-ssb-web