print the error for more info

This commit is contained in:
Chris Wanstrath
2011-11-11 22:32:54 -08:00
parent 6ce84e29ea
commit eb0e8b2ee3

View File

@@ -29,7 +29,8 @@ class KeyBinder
for binding, method of bindings
@keymaps[name][@bindingParser binding] = method
catch error
console.error "Can't load key bindings at `#{path}`. #{error}"
console.error "Can't load key bindings at `#{path}`."
console.error error
handleEvent: (event) ->
keys = []
@@ -51,8 +52,9 @@ class KeyBinder
try
@triggerBinding scope, method
catch e
console.warn "Failed to run binding #{@bindingFromAscii binding}. #{e}"
catch error
console.error "Failed to run binding #{@bindingFromAscii binding}."
console.error error
true