meiersi / blaze-react

A blaze-html style ReactJS binding for Haskell using GHCJS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

show uncaught top-level exceptions

errge11ce opened this issue · comments

If the developer creates an invalid DOM tree (e.g. table -> tr instead of table -> tbody -> tr), then react js itself will have strange issues. This is unfortunately can only be caught run time and the developer can see them by opening the browser's javascript console. On the other hand if the dev forgets to look into the console, the application just misbehave and will arrive at stranger and stranger states.

It would be nice to catch all top level exceptions and just replace the whole SPA with the message or at least display it at the top (similarly to connection errors in dev mode).