_exceptions.py
branchstable
changeset 6347 ef47a2100c66
parent 6211 e9d125fd1465
child 6491 ee9a10b6620e
--- a/_exceptions.py	Mon Sep 27 17:14:23 2010 +0200
+++ b/_exceptions.py	Fri Sep 24 15:00:08 2010 +0200
@@ -130,14 +130,20 @@
     """
 
 class NoSelectableObject(RegistryException):
-    """some views with the given vid have been found but no
-    one is applicable to the result set
-    """
+    """raised when no appobject is selectable for a given context."""
+    def __init__(self, args, kwargs, appobjects):
+        self.args = args
+        self.kwargs = kwargs
+        self.appobjects = appobjects
+
+    def __str__(self):
+        return ('args: %s, kwargs: %s\ncandidates: %s'
+                % (self.args, self.kwargs.keys(), self.appobjects))
+
 
 class UnknownProperty(RegistryException):
     """property found in database but unknown in registry"""
 
-
 # query exception #############################################################
 
 class QueryError(CubicWebRuntimeError):