/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Aaron Bentley
  • Date: 2007-06-28 16:50:06 UTC
  • mfrom: (2561 +trunk)
  • mto: (2520.4.116 bzr.mpbundle)
  • mto: This revision was merged to the branch mainline in revision 2572.
  • Revision ID: abentley@panoramicfeedback.com-20070628165006-m7bd56ngqs26rd91
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
    """
49
49
    Base class for errors raised by bzrlib.
50
50
 
51
 
    :cvar internal_error: if true (or absent) this was probably caused by a
52
 
    bzr bug and should be displayed with a traceback; if False this was
 
51
    :cvar internal_error: if True this was probably caused by a bzr bug and
 
52
    should be displayed with a traceback; if False (or absent) this was
53
53
    probably a user or environment error and they don't need the gory details.
54
54
    (That can be overridden by -Derror on the command line.)
55
55
 
186
186
        self.class_name = class_name
187
187
 
188
188
 
 
189
class IncompatibleAPI(BzrError):
 
190
 
 
191
    _fmt = 'The API for "%(api)s" is not compatible with "%(wanted)s". '\
 
192
        'It supports versions "%(minimum)s" to "%(current)s".'
 
193
 
 
194
    def __init__(self, api, wanted, minimum, current):
 
195
        self.api = api
 
196
        self.wanted = wanted
 
197
        self.minimum = minimum
 
198
        self.current = current
 
199
 
 
200
 
189
201
class InvalidEntryName(BzrError):
190
202
    
191
203
    _fmt = "Invalid entry name: %(name)s"
1579
1591
 
1580
1592
    _fmt = "Bad parameter: %(param)r"
1581
1593
 
 
1594
    internal_error = True
 
1595
 
1582
1596
    # This exception should never be thrown, but it is a base class for all
1583
1597
    # parameter-to-function errors.
1584
1598
 
2186
2200
    def __init__(self, name):
2187
2201
        self.name = name
2188
2202
 
 
2203
 
 
2204
class NoDestinationAddress(BzrError):
 
2205
 
 
2206
    _fmt = "Message does not have a destination address."
 
2207
 
 
2208
    internal_error = True
 
2209
 
 
2210
 
 
2211
class SMTPError(BzrError):
 
2212
 
 
2213
    _fmt = "SMTP error: %(error)s"
 
2214
 
 
2215
    def __init__(self, error):
 
2216
        self.error = error