~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: John Arbash Meinel
  • Date: 2006-10-16 01:50:48 UTC
  • mfrom: (2078 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2080.
  • Revision ID: john@arbash-meinel.com-20061016015048-0f22df07e38093da
[merge] bzr.dev 2078

Show diffs side-by-side

added added

removed removed

Lines of Context:
270
270
    """Directory not empty: %(path)r%(extra)s"""
271
271
 
272
272
 
 
273
class ReadingCompleted(BzrNewError):
 
274
    """The MediumRequest '%(request)s' has already had finish_reading called upon it - the request has been completed and no more data may be read."""
 
275
 
 
276
    is_user_error = False
 
277
 
 
278
    def __init__(self, request):
 
279
        BzrNewError.__init__(self)
 
280
        self.request = request
 
281
 
 
282
 
273
283
class ResourceBusy(PathError):
274
284
    """Device or resource busy: %(path)r%(extra)s"""
275
285
 
802
812
 
803
813
class NoSuchExportFormat(BzrNewError):
804
814
    """Export format %(format)r not supported"""
 
815
 
805
816
    def __init__(self, format):
806
817
        BzrNewError.__init__(self)
807
818
        self.format = format
808
819
 
809
820
 
 
821
 
 
822
class TooManyConcurrentRequests(BzrNewError):
 
823
    """The medium '%(medium)s' has reached its concurrent request limit. Be sure to finish_writing and finish_reading on the current request that is open."""
 
824
 
 
825
    def __init__(self, medium):
 
826
        BzrNewError.__init__(self)
 
827
        self.medium = medium
 
828
 
 
829
 
810
830
class TransportError(BzrNewError):
811
831
    """Transport error: %(msg)s %(orig_error)s"""
812
832
 
911
931
                          " unchanged." % tree.basedir)
912
932
 
913
933
 
 
934
class WritingCompleted(BzrNewError):
 
935
    """The MediumRequest '%(request)s' has already had finish_writing called upon it - accept bytes may not be called anymore."""
 
936
 
 
937
    is_user_error = False
 
938
 
 
939
    def __init__(self, request):
 
940
        BzrNewError.__init__(self)
 
941
        self.request = request
 
942
 
 
943
 
 
944
class WritingNotComplete(BzrNewError):
 
945
    """The MediumRequest '%(request)s' has not has finish_writing called upon it - until the write phase is complete no data may be read."""
 
946
 
 
947
    is_user_error = False
 
948
 
 
949
    def __init__(self, request):
 
950
        BzrNewError.__init__(self)
 
951
        self.request = request
 
952
 
 
953
 
914
954
class CantReprocessAndShowBase(BzrNewError):
915
955
    """Can't reprocess and show base.
916
956
Reprocessing obscures relationship of conflicting lines to base."""
931
971
        self.filename = filename
932
972
 
933
973
 
 
974
class MediumNotConnected(BzrNewError):
 
975
    """The medium '%(medium)s' is not connected."""
 
976
 
 
977
    def __init__(self, medium):
 
978
        BzrNewError.__init__(self)
 
979
        self.medium = medium
 
980
 
 
981
 
934
982
class MustUseDecorated(Exception):
935
983
    """A decorating function has requested its original command be used.
936
984
    
972
1020
    """Tree transform is malformed %(conflicts)r"""
973
1021
 
974
1022
 
 
1023
class NoFinalPath(BzrNewError):
 
1024
    """No final name for trans_id %(trans_id)r
 
1025
    file-id: %(file_id)r"
 
1026
    root trans-id: %(root_trans_id)r 
 
1027
    """
 
1028
 
 
1029
    def __init__(self, trans_id, transform):
 
1030
        self.trans_id = trans_id
 
1031
        self.file_id = transform.final_file_id(trans_id)
 
1032
        self.root_trans_id = transform.root
 
1033
 
 
1034
 
975
1035
class BzrBadParameter(BzrNewError):
976
1036
    """A bad parameter : %(param)s is not usable.
977
1037
    
1224
1284
        BadInventoryFormat.__init__(self, msg=msg)
1225
1285
 
1226
1286
 
 
1287
class NoSmartMedium(BzrNewError):
 
1288
    """The transport '%(transport)s' cannot tunnel the smart protocol."""
 
1289
 
 
1290
    def __init__(self, transport):
 
1291
        BzrNewError.__init__(self)
 
1292
        self.transport = transport
 
1293
 
 
1294
 
1227
1295
class NoSmartServer(NotBranchError):
1228
1296
    """No smart server available at %(url)s"""
1229
1297