+
+ def __init__(self, command):
+ r"""Initialize the Error object.
+
+ See Error class documentation for more info.
+ """
+ self.command = command
+
+ def __str__(self):
+ return 'Command not found: "%s"' % ' '.join(self.command)
+
+def handler(f):
+ f._dispatcher_handler = True
+ return f
+
+def is_handler(handler):
+ return callable(handler) and hasattr(handler, '_dispatcher_handler') \
+ and handler._dispatcher_handler