mirror of
https://github.com/jupyter/notebook.git
synced 2024-11-21 01:11:21 +08:00
Merge pull request #141 from nbarray/nb/remove-sc
shortcut: explicit exception message
This commit is contained in:
commit
da22554e9a
@ -385,10 +385,19 @@ define([
|
||||
if( typeof(shortcut) === 'string'){
|
||||
shortcut = shortcut.split(',');
|
||||
}
|
||||
this._remove_leaf(shortcut, this._shortcuts);
|
||||
if (!suppress_help_update) {
|
||||
/*
|
||||
* 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