luci-base: luci.js: make require() failures catcheable
authorJo-Philipp Wich <jo@mein.io>
Tue, 28 May 2019 17:01:51 +0000 (19:01 +0200)
committerJo-Philipp Wich <jo@mein.io>
Sun, 7 Jul 2019 13:36:25 +0000 (15:36 +0200)
commit5950b87dacf07eebbc58beb9a21781a8abc958e4
tree433105d1793c809584a6cc87763b124153644d2c
parent6edc057451ebade744aa62cca64aa685eb6021ce
luci-base: luci.js: make require() failures catcheable

Refactor L.require() to use L.raise() instead of L.error() to signal
class loading failures. This allows callers to handle class loading
errors in a graceful manner.

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