feat: show uncaught errors in overlay

This commit is contained in:
cha0s 2019-05-11 21:18:04 -05:00
parent be33a59aac
commit 54d132ffdb

View File

@ -22,6 +22,8 @@ import {Room, RoomView} from '@avocado/topdown';
import {augmentParserWithThroughput} from '../common/parser-throughput';
import {WorldTime} from '../common/world-time';
import {CycleTracker} from './cycle-tracker';
import {showMessage} from './overlay';
import Ui from './ui';
import DebugUi from './ui/debug';
@ -574,3 +576,7 @@ export class App extends decorate(class {}) {
}
}
window.addEventListener('error', (event) => {
showMessage(event.error);
});