plugins/key_bindings/lib/key_bindings.rb in redcar-0.12.1 vs plugins/key_bindings/lib/key_bindings.rb in redcar-0.13

- old
+ new

@@ -9,11 +9,15 @@ # and putting them in the menus. class KeyBindings def self.user_keybindings key_bindings = key_binding_prefs.inject({}) do |h, (key, command_class)| - h[key] = eval(command_class) + begin + h[key] = eval(command_class) + rescue + Redcar.log.warn "invalid key binding from \"#{key}\" to #{command_class.inspect} in file \"#{@storage.send(:path)}\"" + end h end key_bindings end @@ -29,6 +33,6 @@ key_binding_prefs[key] = command storage.save Redcar.app.refresh_menu! end end -end \ No newline at end of file +end