Thesaurus
Thesaurus copied to clipboard
Show information when no alternative found
Currently only a debug information followed by an error is printed to the console:
Thesaurus.thesaurus.NoResultError: 'Word not found.'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 549, in run_
return self.run(edit)
File "/Users/peterpablo/Library/Application Support/Sublime Text 3/Packages/Thesaurus/thesaurus.py", line 35, in run
self.processWord(self.selected_word())
File "/Users/peterpablo/Library/Application Support/Sublime Text 3/Packages/Thesaurus/thesaurus.py", line 55, in processWord
self.alternatives.extend(self.get_alternative_words())
File "/Users/peterpablo/Library/Application Support/Sublime Text 3/Packages/Thesaurus/thesaurus.py", line 135, in get_alternative_words
if alternatives[0] == "error":
IndexError: list index out of range
I propose to show a prominent message, the same that is done when no word is selected Please select a word first!.
You might try this commit: https://github.com/git-commit/Thesaurus/commit/3924bf66d421af676a229893af24eb21185107e3