luci-base: luci.js: tweak error handling
authorJo-Philipp Wich <jo@mein.io>
Mon, 1 Apr 2019 13:30:42 +0000 (15:30 +0200)
committerJo-Philipp Wich <jo@mein.io>
Sun, 7 Jul 2019 13:25:49 +0000 (15:25 +0200)
commit5b7924c8087b93037ae20e03f35bd0c7e9e06a05
tree82ecd94ab3e77e63c48b051890be54cd970786e3
parentfda4ba598c0ba1c06f5de43554b40cf0d415d047
luci-base: luci.js: tweak error handling

If the ui class is loaded, use its modalDialog facility to display runtime
errors, alternatively render them into the maincontent area.

Also prevent duplication of stack trace information and throw a low level
error on session expiration to allow higher layers to properly handle it.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/luci.js