summaryrefslogtreecommitdiffstats
path: root/bindings/python
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-11-09 20:08:46 +0100
committerDavid Robillard <d@drobilla.net>2019-11-09 20:08:55 +0100
commit8db73b7d0ff6fb1d14794da26e8ea656aab78d4a (patch)
tree4897568d352b8c802585756ad5fd6fc7a30e355d /bindings/python
parent79a454973021ab6d7aaacd4e53979d64715b9ba6 (diff)
downloadlilv-8db73b7d0ff6fb1d14794da26e8ea656aab78d4a.tar.gz
lilv-8db73b7d0ff6fb1d14794da26e8ea656aab78d4a.tar.bz2
lilv-8db73b7d0ff6fb1d14794da26e8ea656aab78d4a.zip
Make Python exceptions more informative
Diffstat (limited to 'bindings/python')
-rw-r--r--bindings/python/lilv.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/bindings/python/lilv.py b/bindings/python/lilv.py
index 70fb79f..c548e98 100644
--- a/bindings/python/lilv.py
+++ b/bindings/python/lilv.py
@@ -915,7 +915,7 @@ class Collection(Structure):
it = self.iter_next(self.collection, it)
pos = pos + 1
- raise IndexError
+ raise IndexError(index)
def begin(self):
return self.__iter__()
@@ -957,7 +957,7 @@ class Plugins(Collection):
plugin = self.get_by_uri(key)
if plugin is None:
- raise KeyError
+ raise KeyError("Plugin not found: " + str(key))
return plugin
@@ -1004,7 +1004,7 @@ class PluginClasses(Collection):
klass = self.get_by_uri(key)
if klass is None:
- raise KeyError
+ raise KeyError("Plugin class not found: " + str(key))
return klass
@@ -1054,7 +1054,7 @@ class UIs(Collection):
ui = self.get_by_uri(key)
if ui is None:
- raise KeyError
+ raise KeyError("Plugin UI not found: " + str(key))
return ui