summaryrefslogtreecommitdiff
path: root/utils/vim-lldb/python-vim-lldb/plugin.py
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2016-01-06 20:12:03 +0000
committerDimitry Andric <dim@FreeBSD.org>2016-01-06 20:12:03 +0000
commit9e6d35490a6542f9c97607f93c2ef8ca8e03cbcc (patch)
treedd2a1ddf0476664c2b823409c36cbccd52662ca7 /utils/vim-lldb/python-vim-lldb/plugin.py
parent3bd2e91faeb9eeec1aae82c64a3253afff551cfd (diff)
Notes
Diffstat (limited to 'utils/vim-lldb/python-vim-lldb/plugin.py')
-rw-r--r--utils/vim-lldb/python-vim-lldb/plugin.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/utils/vim-lldb/python-vim-lldb/plugin.py b/utils/vim-lldb/python-vim-lldb/plugin.py
new file mode 100644
index 0000000000000..694783a95b0e4
--- /dev/null
+++ b/utils/vim-lldb/python-vim-lldb/plugin.py
@@ -0,0 +1,14 @@
+
+# Try to import all dependencies, catch and handle the error gracefully if it fails.
+
+import import_lldb
+
+try:
+ import lldb
+ import vim
+except ImportError:
+ sys.stderr.write("Unable to load vim/lldb module. Check lldb is on the path is available (or LLDB is set) and that script is invoked inside Vim with :pyfile")
+ pass
+else:
+ # Everthing went well, so use import to start the plugin controller
+ from lldb_controller import *