1 """
2 Exceptions used to convey information during the sync process
3
4 Copyright: John Stowers, 2006
5 License: GPLv2
6 """
7
9 """
10 Exception thrown by TypeConverter when it could not convert stuff due to an
11 error in the conversion function
12 """
14 self.fromType = fromType
15 self.toType = toType
16 Exception.__init__(self,
17 "Could not convert: %s -> %s" % (self.fromType, self.toType)
18 )
19
21 """
22 Thrown when the typeconverter tries a conversion that does not exist
23 """
25 self.fromType = fromType
26 self.toType = toType
27 Exception.__init__(self,
28 "No conversion exists: %s -> %s" % (self.fromType, self.toType)
29 )
30
32 """
33 Exception thrown upon failure to refresh conduit
34 """
35 pass
36
38 """
39 Exception thrown when a dataprovider cannot be loaded
40 """
41 pass
42
44 """
45 Non-fatal, i.e. dont stop the whole sync process, just ignore this
46 one particular attempt to get() a resource as failed
47 """
48 pass
49
51 """
52 Fatal error returned from sync. Do not attempt again
53 """
54 pass
55
57 """
58 Raised in the put() method when the input data conflicts with data
59 already present and user intervention is needed to resolve
60 """
61 - def __init__(self, comparison, fromData, toData):
62 self.comparison = comparison
63 self.fromData = fromData
64 self.toData = toData
65 Exception.__init__(self,
66 "Comparison=%s (From: %s, To:%s)" % (self.comparison, self.fromData, self.toData)
67 )
68
70 """
71 Raised by the syncworker to tell the syncmanager to stop
72 """
74 self.step = step
75 Exception.__init__(self,
76 "Sync aborted at step %s" % self.step
77 )
78