Contact: fumanchu@aminus.org

Log in as guest/dejavu to create tickets

I think I've seen this ORM somewhere before...

root/branches/1.5/dejavu/errors.py

Revision 487 (checked in by fumanchu, 5 years ago)

Moved all content down one folder. Added setup.py.

  • Property svn:eol-style set to native
Line 
1
2 class DejavuError(Exception):
3     """Base class for errors which occur within Dejavu."""
4     def __init__(self, *args):
5         Exception.__init__(self)
6         self.args = args
7    
8     def __str__(self):
9         return u'\n'.join([unicode(arg) for arg in self.args])
10
11 class AssociationError(DejavuError):
12     """Exception raised when a Unit association fails."""
13     pass
14
15 class UnrecallableError(DejavuError):
16     """Exception raised when a Unit was sought but not recalled."""
17     pass
18
19 class MappingError(DejavuError):
20     """Exception raised when a Unit class cannot be mapped to storage.
21     
22     This exception should be raised when a consumer attempts to build
23     a map between a Unit class and existing internal storage structures.
24     Other exceptions may be raised when trying to find such a map after
25     it has already (supposedly) been created. That is, the questions
26     "do we have a map?" and "can we create a map?" are distinct.
27     The latter should raise this exception whenever possible.
28     The behavior of the former is not specified.
29     """
30     pass
31
32 class StorageWarning(UserWarning):
33     """Warning about functionality which is not supported by all SM's."""
34     pass
Note: See TracBrowser for help on using the browser.