From 5300781f22e9f80240eac0e643b027a71b6e20e2 Mon Sep 17 00:00:00 2001 From: Mika Fischer Date: Wed, 29 Jun 2011 16:20:45 +0200 Subject: [PATCH] Add marginally better error when inserter could not be found --- sloth/gui/annotationscene.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sloth/gui/annotationscene.py b/sloth/gui/annotationscene.py index 784032a..56a9ae1 100644 --- a/sloth/gui/annotationscene.py +++ b/sloth/gui/annotationscene.py @@ -115,7 +115,7 @@ class AnnotationScene(QGraphicsScene): default_properties = self.labeltool_.propertyeditor().currentEditorProperties() inserter = self.inserterfactory_.create(label_class, self.labeltool_, self, default_properties) if inserter is None: - raise InvalidArgumentException("Invalid mode") + raise InvalidArgumentException("Could not find inserter for class '%s' with default properties '%s'" % (label_class, default_properties)) inserter.inserterFinished.connect(self.onInserterFinished) self.inserter_ = inserter LOG.debug("Created inserter for class '%s' with default properties '%s'" % (label_class, default_properties))