/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: Martin Pool
  • Date: 2007-08-21 03:53:07 UTC
  • mfrom: (2736 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2738.
  • Revision ID: mbp@sourcefrog.net-20070821035307-krkxgs8g0eryzl2r
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
264
264
        self.tree = tree
265
265
 
266
266
 
 
267
class NoSuchIdInRepository(NoSuchId):
 
268
 
 
269
    _fmt = ("The file id %(file_id)r is not present in the repository"
 
270
            " %(repository)r")
 
271
 
 
272
    def __init__(self, repository, file_id):
 
273
        BzrError.__init__(self, repository=repository, file_id=file_id)
 
274
 
 
275
 
267
276
class InventoryModified(BzrError):
268
277
 
269
278
    _fmt = ("The current inventory for the tree %(tree)r has been modified,"
962
971
 
963
972
class NoSuchRevision(BzrError):
964
973
 
965
 
    _fmt = "Branch %(branch)s has no revision %(revision)s"
 
974
    _fmt = "%(branch)s has no revision %(revision)s"
966
975
 
967
976
    internal_error = True
968
977
 
969
978
    def __init__(self, branch, revision):
 
979
        # 'branch' may sometimes be an internal object like a KnitRevisionStore
970
980
        BzrError.__init__(self, branch=branch, revision=revision)
971
981
 
972
982
 
 
983
# zero_ninetyone: this exception is no longer raised and should be removed
973
984
class NotLeftParentDescendant(BzrError):
974
985
 
975
986
    _fmt = ("Revision %(old_revision)s is not the left parent of"
2308
2319
 
2309
2320
    def __init__(self, error):
2310
2321
        self.error = error
 
2322
 
 
2323
 
 
2324
class NoMessageSupplied(BzrError):
 
2325
 
 
2326
    _fmt = "No message supplied."
 
2327
 
 
2328
 
 
2329
class UnknownMailClient(BzrError):
 
2330
 
 
2331
    _fmt = "Unknown mail client: %(mail_client)s"
 
2332
 
 
2333
    def __init__(self, mail_client):
 
2334
        BzrError.__init__(self, mail_client=mail_client)
 
2335
 
 
2336
 
 
2337
class MailClientNotFound(BzrError):
 
2338
 
 
2339
    _fmt = "Unable to find mail client with the following names:"\
 
2340
        " %(mail_command_list_string)s"
 
2341
 
 
2342
    def __init__(self, mail_command_list):
 
2343
        mail_command_list_string = ', '.join(mail_command_list)
 
2344
        BzrError.__init__(self, mail_command_list=mail_command_list,
 
2345
                          mail_command_list_string=mail_command_list_string)
 
2346
 
 
2347
class SMTPConnectionRefused(SMTPError):
 
2348
 
 
2349
    _fmt = "SMTP connection to %(host)s refused"
 
2350
 
 
2351
    def __init__(self, error, host):
 
2352
        self.error = error
 
2353
        self.host = host
 
2354
 
 
2355
 
 
2356
class DefaultSMTPConnectionRefused(SMTPConnectionRefused):
 
2357
 
 
2358
    _fmt = "Please specify smtp_server.  No server at default %(host)s."