mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-10 07:41:51 +08:00
refined NotFoundError doc
This commit is contained in:
@@ -133,6 +133,10 @@ have the following objects available:
|
||||
> imports and doesn't break there. You probably don't want to use this
|
||||
> function. It's mostly for testing.
|
||||
|
||||
`NotFoundError`
|
||||
> If you use the goto function and no valid identifier (name) is at the
|
||||
> place of the cursor (position). It will raise this exception.
|
||||
|
||||
`set_debug_function`
|
||||
> Sets a callback function for `debug.py`. This function is called with
|
||||
> multiple text objects, in python 3 you could insert `print`.
|
||||
|
||||
@@ -9,7 +9,6 @@ import debug
|
||||
import imports
|
||||
import os
|
||||
|
||||
# TODO remove NotFoundError, should not be exposed
|
||||
__all__ = ['complete', 'goto', 'get_definitions',
|
||||
'NotFoundError', 'set_debug_function']
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ if 1:
|
||||
try:
|
||||
definitions = functions.goto(source, row, column, buf_path)
|
||||
except functions.NotFoundError:
|
||||
echo_highlight("Couldn't find a place to goto.")
|
||||
echo_highlight("Cannot follow nothing. Put your cursor on a valid name.")
|
||||
except Exception:
|
||||
# print to stdout, will be in :messages
|
||||
echo_highlight("Some different eror, this shouldn't happen.")
|
||||
|
||||
Reference in New Issue
Block a user