Added try/catch block to handle exceptions if widgets.

This commit is contained in:
Martin Edenhofer 2016-08-31 23:18:34 +02:00
parent 8fd97df19a
commit af1aa0874d

View file

@ -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]
try
new widget( new widget(
el: el el: el
key: key 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