Added try/catch block to handle exceptions if widgets.
This commit is contained in:
parent
8fd97df19a
commit
af1aa0874d
1 changed files with 7 additions and 4 deletions
|
@ -43,10 +43,13 @@ class App.Run extends App.Controller
|
||||||
sortedKeys = Object.keys(widgets).sort()
|
sortedKeys = Object.keys(widgets).sort()
|
||||||
for key in sortedKeys
|
for key in sortedKeys
|
||||||
widget = widgets[key]
|
widget = widgets[key]
|
||||||
new widget(
|
try
|
||||||
el: el
|
new widget(
|
||||||
key: key
|
el: el
|
||||||
)
|
key: key
|
||||||
|
)
|
||||||
|
catch e
|
||||||
|
@log 'error', "widget #{key}:", e
|
||||||
App.Event.trigger(event + ':ready')
|
App.Event.trigger(event + ':ready')
|
||||||
|
|
||||||
class App.Content extends App.ControllerWidgetPermanent
|
class App.Content extends App.ControllerWidgetPermanent
|
||||||
|
|
Loading…
Reference in a new issue