mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-09 23:34:45 +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
|
> imports and doesn't break there. You probably don't want to use this
|
||||||
> function. It's mostly for testing.
|
> 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`
|
`set_debug_function`
|
||||||
> Sets a callback function for `debug.py`. This function is called with
|
> Sets a callback function for `debug.py`. This function is called with
|
||||||
> multiple text objects, in python 3 you could insert `print`.
|
> multiple text objects, in python 3 you could insert `print`.
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import debug
|
|||||||
import imports
|
import imports
|
||||||
import os
|
import os
|
||||||
|
|
||||||
# TODO remove NotFoundError, should not be exposed
|
|
||||||
__all__ = ['complete', 'goto', 'get_definitions',
|
__all__ = ['complete', 'goto', 'get_definitions',
|
||||||
'NotFoundError', 'set_debug_function']
|
'NotFoundError', 'set_debug_function']
|
||||||
|
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ if 1:
|
|||||||
try:
|
try:
|
||||||
definitions = functions.goto(source, row, column, buf_path)
|
definitions = functions.goto(source, row, column, buf_path)
|
||||||
except functions.NotFoundError:
|
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:
|
except Exception:
|
||||||
# print to stdout, will be in :messages
|
# print to stdout, will be in :messages
|
||||||
echo_highlight("Some different eror, this shouldn't happen.")
|
echo_highlight("Some different eror, this shouldn't happen.")
|
||||||
|
|||||||
Reference in New Issue
Block a user