diff options
| author | Martin Bielik <mx.bielik@gmail.com> | 2023-04-15 12:58:24 +0200 |
|---|---|---|
| committer | Martin Bielik <mx.bielik@gmail.com> | 2023-04-15 12:58:24 +0200 |
| commit | 4bb95955c5ee1e4d5f7aaeec549b4b865d356773 (patch) | |
| tree | 60a29f6da00d45da27aa990d9384236eb425ddf3 /py/complete.py | |
| parent | f69e39a0406999b6460295aa9f850b0444769080 (diff) | |
| download | vim-ai-4bb95955c5ee1e4d5f7aaeec549b4b865d356773.tar.gz | |
reusing error handler
Diffstat (limited to '')
| -rw-r--r-- | py/complete.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/py/complete.py b/py/complete.py index 1045720..9929cf7 100644 --- a/py/complete.py +++ b/py/complete.py @@ -49,10 +49,5 @@ try: vim.command("redraw") text_chunks = engines[engine](prompt) render_text_chunks(text_chunks) -except KeyboardInterrupt: - vim.command("normal! a Ctrl-C...") -except URLError as error: - if isinstance(error.reason, socket.timeout): - vim.command("normal! aRequest timeout...") - else: - raise error +except BaseException as error: + handle_completion_error(error) |