Commits

Gustavo Picon committed 5e39c47

gah forgot to svn add exceptions.py

  • Participants
  • Parent commits 29b76a1
  • Tags 1.1

Comments (0)

Files changed (4)

 UPDATING
 setup.py
 treebeard/__init__.py
+treebeard/exceptions.py
 treebeard/models.py
 treebeard/al_tree.py
 treebeard/mp_tree.py

File docs/conf.py

 # other places throughout the built documents.
 #
 # The short X.Y version.
-version = '1.0'
+version = '1.1'
 # The full version, including alpha/beta/rc tags.
-release = '1.0'
+release = '1.1'
 
 # There are two options for replacing |today|: either, you set today to some
 # non-false value, then it is used:

File treebeard/__init__.py

     :synopsys: Efficient Tree implementations for Django 1.0+
     :copyright: 2008 by `Gustavo Picon <http://gpicon.org>`_
     :license: Apache License 2.0
-    :version: 1.0
+    :version: 1.1
     :url: http://code.google.com/p/django-treebeard/
     :documentation:
        `treebeard-docs
 
 """
 
-VERSION = (1, 0, None)
+VERSION = (1, 1, None)
 

File treebeard/exceptions.py

+# -*- coding: utf-8 -*-
+"""
+
+    treebeard.exceptions
+    --------------------
+
+    Exceptions
+
+    :copyright: 2008 by Gustavo Picon
+    :license: Apache License 2.0
+
+"""
+
+class InvalidPosition(Exception):
+    """
+    Raised when passing an invalid pos value
+    """
+
+class InvalidMoveToDescendant(Exception):
+    """
+    Raised when attemping to move a node to one of it's descendants.
+    """
+
+class MissingNodeOrderBy(Exception):
+    """
+    Raised when an operation needs a missing
+    :attr:`~treebeard.MP_Node.node_order_by` attribute
+    """
+
+class PathOverflow(Exception):
+    """
+    Raised when trying to add or move a node to a position where no more nodes
+    can be added (see :attr:`~treebeard.MP_Node.path` and
+    :attr:`~treebeard.MP_Node.alphabet` for more info)
+    """