mirror of
https://github.com/jupyter/notebook.git
synced 2024-11-27 03:20:27 +08:00
Merge pull request #141 from nbarray/nb/remove-sc
shortcut: explicit exception message
This commit is contained in:
commit
da22554e9a
@ -385,11 +385,20 @@ define([
|
||||
if( typeof(shortcut) === 'string'){
|
||||
shortcut = shortcut.split(',');
|
||||
}
|
||||
/*
|
||||
* The shortcut error should be explicit here, because it will be
|
||||
* seen by users.
|
||||
*/
|
||||
try
|
||||
{
|
||||
this._remove_leaf(shortcut, this._shortcuts);
|
||||
if (!suppress_help_update) {
|
||||
// update the keyboard shortcuts notebook help
|
||||
this.events.trigger('rebuild.QuickHelp');
|
||||
}
|
||||
} catch (ex) {
|
||||
throw ('try to remove non-existing shortcut');
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user