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()
|
||||
for key in sortedKeys
|
||||
widget = widgets[key]
|
||||
new widget(
|
||||
el: el
|
||||
key: key
|
||||
)
|
||||
try
|
||||
new widget(
|
||||
el: el
|
||||
key: key
|
||||
)
|
||||
catch e
|
||||
@log 'error', "widget #{key}:", e
|
||||
App.Event.trigger(event + ':ready')
|
||||
|
||||
class App.Content extends App.ControllerWidgetPermanent
|
||||
|
|
Loading…
Reference in a new issue