|
Revision 379
(checked in by fumanchu, 5 years ago)
|
Removed need for map_all by reinstating auto-map in arena.storage. All DB's now have a _get_table(tablename) method (plus a fallback method in the base class). New MappingError?. Database.discover is now called "discover_all", and "discover" now takes a tablename arg. Also fixed bug in geniusql.IndexSet? (set/del didn't modify the dict). Also fixed bugs in FB get_indices and python_type. Finally, separated modeler tests into a spearate TestCase?.
|
- 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 |
|---|