hexops / vecty

Vecty lets you build responsive and dynamic web frontends in Go using WebAssembly, competing with modern web frameworks like React & VueJS.
BSD 3-Clause "New" or "Revised" License
2.8k stars 143 forks source link

allow global panic handler #284

Closed xoviat closed 2 years ago

xoviat commented 2 years ago

The proposed handler would be installed at dom_js.go, line 60. If specified, it would allow recovery of almost all panics, and allow the opportunity to display a simple 'this app has crashed' page rather than crashing in the console.

xoviat commented 2 years ago

Thoughts, @slimsag?

xoviat commented 2 years ago

This is a bad idea. A better idea is to have a javascript monitor watching for a crash.