85
34
# constructed to make sure it will succeed. But that says nothing about
86
35
# exceptions that are never raised.
88
# TODO: Convert all the other error classes here to BzrNewError, and eliminate
91
# TODO: The pattern (from hct) of using classes docstrings as message
92
# templates is cute but maybe not such a great idea - perhaps should have a
93
# separate static message_template.
37
# TODO: selftest assertRaises should probably also check that every error
38
# raised can be formatted as a string successfully, and without giving
96
42
class BzrError(StandardError):
44
Base class for errors raised by bzrlib.
46
:cvar is_user_error: True if this is a user error and should be
47
displayed concisely; false if this is bzr's fault and it should
50
:cvar fmt: Format string to display the error; this is expanded
51
by the instance's dict.
98
54
is_user_error = True
56
def __init__(self, msg=None, **kwds):
57
"""Construct a new BzrError.
59
There are two alternative forms for constructing these objects.
60
Either a preformatted string may be passed, or a set of named
61
arguments can be given. The first is for generic "user" errors which
62
are not intended to be caught and so do not need a specific subclass.
63
The second case is for use with subclasses that provide a _fmt format
64
string to print the arguments.
66
Keyword arguments are taken as parameters to the error, which can
67
be inserted into the format string template. It's recommended
68
that subclasses override the __init__ method to require specific
71
:param msg: Deprecated parameter for passing a format string
74
StandardError.__init__(self)
76
## symbol_versioning.warn(
77
## 'constructing a BzrError from a string was deprecated '
78
## 'in bzr 0.12; please raise a specific subclass instead',
79
## DeprecationWarning,
84
for key, value in kwds.items():
85
setattr(self, key, value)
100
87
def __str__(self):
101
# XXX: Should we show the exception class in
102
# exceptions that don't provide their own message?
103
# maybe it should be done at a higher level
104
## n = self.__class__.__name__ + ': '
106
if len(self.args) == 1:
107
return str(self.args[0])
108
elif len(self.args) == 2:
109
# further explanation or suggestions
111
return n + '\n '.join([self.args[0]] + self.args[1])
113
return n + "%r" % self
115
return n + `self.args`
88
s = getattr(self, '_str', None)
90
# contains a preformatted message; must be cast to plain str
93
# __str__() should always return a 'str' object
94
# never a 'unicode' object.
95
s = self._fmt % self.__dict__
96
if isinstance(s, unicode):
97
return s.encode('utf8')
99
except (AttributeError, TypeError, NameError, ValueError, KeyError), e:
100
return 'Unprintable exception %s: dict=%r, fmt=%r, error=%s' \
101
% (self.__class__.__name__,
103
getattr(self, '_fmt', None),
118
107
class BzrNewError(BzrError):
108
"""Deprecated error base class."""
120
109
# base classes should override the docstring with their human-
121
110
# readable explanation
142
136
self.__dict__, str(e))
145
class AlreadyBuilding(BzrNewError):
146
"""The tree builder is already building a tree."""
149
class BzrCheckError(BzrNewError):
150
"""Internal check failed: %(message)s"""
139
class AlreadyBuilding(BzrError):
141
_fmt = "The tree builder is already building a tree."
144
class BzrCheckError(BzrError):
146
_fmt = "Internal check failed: %(message)s"
152
148
is_user_error = False
154
150
def __init__(self, message):
155
BzrNewError.__init__(self)
151
BzrError.__init__(self)
156
152
self.message = message
159
class InvalidEntryName(BzrNewError):
160
"""Invalid entry name: %(name)s"""
155
class InvalidEntryName(BzrError):
157
_fmt = "Invalid entry name: %(name)s"
162
159
is_user_error = False
164
161
def __init__(self, name):
165
BzrNewError.__init__(self)
162
BzrError.__init__(self)
169
class InvalidRevisionNumber(BzrNewError):
170
"""Invalid revision number %(revno)d"""
166
class InvalidRevisionNumber(BzrError):
168
_fmt = "Invalid revision number %(revno)s"
171
170
def __init__(self, revno):
172
BzrNewError.__init__(self)
171
BzrError.__init__(self)
173
172
self.revno = revno
176
class InvalidRevisionId(BzrNewError):
177
"""Invalid revision-id {%(revision_id)s} in %(branch)s"""
175
class InvalidRevisionId(BzrError):
177
_fmt = "Invalid revision-id {%(revision_id)s} in %(branch)s"
179
179
def __init__(self, revision_id, branch):
180
180
# branch can be any string or object with __str__ defined
181
BzrNewError.__init__(self)
181
BzrError.__init__(self)
182
182
self.revision_id = revision_id
183
183
self.branch = branch
186
class NoSuchId(BzrNewError):
187
"""The file id %(file_id)s is not present in the tree %(tree)s."""
186
class NoSuchId(BzrError):
188
_fmt = "The file id %(file_id)s is not present in the tree %(tree)s."
189
190
def __init__(self, tree, file_id):
190
BzrNewError.__init__(self)
191
BzrError.__init__(self)
191
192
self.file_id = file_id
195
class NoWorkingTree(BzrNewError):
196
"""No WorkingTree exists for %(base)s."""
196
class NoWorkingTree(BzrError):
198
_fmt = "No WorkingTree exists for %(base)s."
198
200
def __init__(self, base):
199
BzrNewError.__init__(self)
201
BzrError.__init__(self)
203
class NotBuilding(BzrNewError):
204
"""Not currently building a tree."""
207
class NotLocalUrl(BzrNewError):
208
"""%(url)s is not a local path."""
205
class NotBuilding(BzrError):
207
_fmt = "Not currently building a tree."
210
class NotLocalUrl(BzrError):
212
_fmt = "%(url)s is not a local path."
210
214
def __init__(self, url):
211
BzrNewError.__init__(self)
215
BzrError.__init__(self)
215
class BzrCommandError(BzrNewError):
219
class BzrCommandError(BzrError):
216
220
"""Error from user command"""
218
222
is_user_error = True
359
381
class InaccessibleParent(PathError):
360
"""Parent not accessible given base %(base)s and relative path %(path)s"""
383
_fmt = "Parent not accessible given base %(base)s and relative path %(path)s"
362
385
def __init__(self, path, base):
363
386
PathError.__init__(self, path)
367
class NoRepositoryPresent(BzrNewError):
368
"""No repository present: %(path)r"""
390
class NoRepositoryPresent(BzrError):
392
_fmt = "No repository present: %(path)r"
369
393
def __init__(self, bzrdir):
370
BzrNewError.__init__(self)
394
BzrError.__init__(self)
371
395
self.path = bzrdir.transport.clone('..').base
374
class FileInWrongBranch(BzrNewError):
375
"""File %(path)s in not in branch %(branch_base)s."""
398
class FileInWrongBranch(BzrError):
400
_fmt = "File %(path)s in not in branch %(branch_base)s."
377
402
def __init__(self, branch, path):
378
BzrNewError.__init__(self)
403
BzrError.__init__(self)
379
404
self.branch = branch
380
405
self.branch_base = branch.base
384
class UnsupportedFormatError(BzrNewError):
385
"""Unsupported branch format: %(format)s"""
388
class UnknownFormatError(BzrNewError):
389
"""Unknown branch format: %(format)r"""
392
class IncompatibleFormat(BzrNewError):
393
"""Format %(format)s is not compatible with .bzr version %(bzrdir)s."""
409
class UnsupportedFormatError(BzrError):
411
_fmt = "Unsupported branch format: %(format)s"
414
class UnknownFormatError(BzrError):
416
_fmt = "Unknown branch format: %(format)r"
419
class IncompatibleFormat(BzrError):
421
_fmt = "Format %(format)s is not compatible with .bzr version %(bzrdir)s."
395
423
def __init__(self, format, bzrdir_format):
396
BzrNewError.__init__(self)
424
BzrError.__init__(self)
397
425
self.format = format
398
426
self.bzrdir = bzrdir_format
401
class IncompatibleRevision(BzrNewError):
402
"""Revision is not compatible with %(repo_format)s"""
429
class IncompatibleRevision(BzrError):
431
_fmt = "Revision is not compatible with %(repo_format)s"
404
433
def __init__(self, repo_format):
405
BzrNewError.__init__(self)
434
BzrError.__init__(self)
406
435
self.repo_format = repo_format
409
class NotVersionedError(BzrNewError):
410
"""%(path)s is not versioned"""
438
class NotVersionedError(BzrError):
440
_fmt = "%(path)s is not versioned"
411
442
def __init__(self, path):
412
BzrNewError.__init__(self)
443
BzrError.__init__(self)
416
class PathsNotVersionedError(BzrNewError):
447
class PathsNotVersionedError(BzrError):
417
448
# used when reporting several paths are not versioned
418
"""Path(s) are not versioned: %(paths_as_string)s"""
450
_fmt = "Path(s) are not versioned: %(paths_as_string)s"
420
452
def __init__(self, paths):
421
453
from bzrlib.osutils import quotefn
422
BzrNewError.__init__(self)
454
BzrError.__init__(self)
423
455
self.paths = paths
424
456
self.paths_as_string = ' '.join([quotefn(p) for p in paths])
427
class PathsDoNotExist(BzrNewError):
428
"""Path(s) do not exist: %(paths_as_string)s"""
459
class PathsDoNotExist(BzrError):
461
_fmt = "Path(s) do not exist: %(paths_as_string)s"
430
463
# used when reporting that paths are neither versioned nor in the working
941
class NoBundleFound(BzrNewError):
942
"""No bundle was found in %(filename)s"""
1036
class NoBundleFound(BzrError):
1038
_fmt = "No bundle was found in %(filename)s"
943
1039
def __init__(self, filename):
944
BzrNewError.__init__(self)
1040
BzrError.__init__(self)
945
1041
self.filename = filename
948
class BundleNotSupported(BzrNewError):
949
"""Unable to handle bundle version %(version)s: %(msg)s"""
1044
class BundleNotSupported(BzrError):
1046
_fmt = "Unable to handle bundle version %(version)s: %(msg)s"
950
1047
def __init__(self, version, msg):
951
BzrNewError.__init__(self)
1048
BzrError.__init__(self)
952
1049
self.version = version
956
class MissingText(BzrNewError):
957
"""Branch %(base)s is missing revision %(text_revision)s of %(file_id)s"""
1053
class MissingText(BzrError):
1055
_fmt = "Branch %(base)s is missing revision %(text_revision)s of %(file_id)s"
959
1057
def __init__(self, branch, text_revision, file_id):
960
BzrNewError.__init__(self)
1058
BzrError.__init__(self)
961
1059
self.branch = branch
962
1060
self.base = branch.base
963
1061
self.text_revision = text_revision
964
1062
self.file_id = file_id
967
class DuplicateKey(BzrNewError):
968
"""Key %(key)s is already present in map"""
971
class MalformedTransform(BzrNewError):
972
"""Tree transform is malformed %(conflicts)r"""
975
class BzrBadParameter(BzrNewError):
976
"""A bad parameter : %(param)s is not usable.
1065
class DuplicateKey(BzrError):
1067
_fmt = "Key %(key)s is already present in map"
1070
class MalformedTransform(BzrError):
1072
_fmt = "Tree transform is malformed %(conflicts)r"
1075
class BzrBadParameter(BzrError):
1077
_fmt = "Bad parameter: %(param)r"
978
This exception should never be thrown, but it is a base class for all
979
parameter-to-function errors.
1079
# This exception should never be thrown, but it is a base class for all
1080
# parameter-to-function errors.
981
1082
def __init__(self, param):
982
BzrNewError.__init__(self)
1083
BzrError.__init__(self)
983
1084
self.param = param
986
1087
class BzrBadParameterNotUnicode(BzrBadParameter):
987
"""Parameter %(param)s is neither unicode nor utf8."""
990
class ReusingTransform(BzrNewError):
991
"""Attempt to reuse a transform that has already been applied."""
994
class CantMoveRoot(BzrNewError):
995
"""Moving the root directory is not supported at this time"""
1089
_fmt = "Parameter %(param)s is neither unicode nor utf8."
1092
class ReusingTransform(BzrError):
1094
_fmt = "Attempt to reuse a transform that has already been applied."
1097
class CantMoveRoot(BzrError):
1099
_fmt = "Moving the root directory is not supported at this time"
998
1102
class BzrBadParameterNotString(BzrBadParameter):
999
"""Parameter %(param)s is not a string or unicode string."""
1104
_fmt = "Parameter %(param)s is not a string or unicode string."
1002
1107
class BzrBadParameterMissing(BzrBadParameter):
1003
"""Parameter $(param)s is required but not present."""
1109
_fmt = "Parameter $(param)s is required but not present."
1006
1112
class BzrBadParameterUnicode(BzrBadParameter):
1007
"""Parameter %(param)s is unicode but only byte-strings are permitted."""
1114
_fmt = "Parameter %(param)s is unicode but only byte-strings are permitted."
1010
1117
class BzrBadParameterContainsNewline(BzrBadParameter):
1011
"""Parameter %(param)s contains a newline."""
1014
class DependencyNotPresent(BzrNewError):
1015
"""Unable to import library "%(library)s": %(error)s"""
1119
_fmt = "Parameter %(param)s contains a newline."
1122
class DependencyNotPresent(BzrError):
1124
_fmt = 'Unable to import library "%(library)s": %(error)s'
1017
1126
def __init__(self, library, error):
1018
BzrNewError.__init__(self, library=library, error=error)
1127
BzrError.__init__(self, library=library, error=error)
1021
1130
class ParamikoNotPresent(DependencyNotPresent):
1022
"""Unable to import paramiko (required for sftp support): %(error)s"""
1132
_fmt = "Unable to import paramiko (required for sftp support): %(error)s"
1024
1134
def __init__(self, error):
1025
1135
DependencyNotPresent.__init__(self, 'paramiko', error)
1028
class PointlessMerge(BzrNewError):
1029
"""Nothing to merge."""
1032
class UninitializableFormat(BzrNewError):
1033
"""Format %(format)s cannot be initialised by this version of bzr."""
1138
class PointlessMerge(BzrError):
1140
_fmt = "Nothing to merge."
1143
class UninitializableFormat(BzrError):
1145
_fmt = "Format %(format)s cannot be initialised by this version of bzr."
1035
1147
def __init__(self, format):
1036
BzrNewError.__init__(self)
1148
BzrError.__init__(self)
1037
1149
self.format = format
1040
class BadConversionTarget(BzrNewError):
1041
"""Cannot convert to format %(format)s. %(problem)s"""
1152
class BadConversionTarget(BzrError):
1154
_fmt = "Cannot convert to format %(format)s. %(problem)s"
1043
1156
def __init__(self, problem, format):
1044
BzrNewError.__init__(self)
1157
BzrError.__init__(self)
1045
1158
self.problem = problem
1046
1159
self.format = format
1049
class NoDiff(BzrNewError):
1050
"""Diff is not installed on this machine: %(msg)s"""
1162
class NoDiff(BzrError):
1164
_fmt = "Diff is not installed on this machine: %(msg)s"
1052
1166
def __init__(self, msg):
1053
BzrNewError.__init__(self, msg=msg)
1056
class NoDiff3(BzrNewError):
1057
"""Diff3 is not installed on this machine."""
1060
class ExistingLimbo(BzrNewError):
1061
"""This tree contains left-over files from a failed operation.
1062
Please examine %(limbo_dir)s to see if it contains any files you wish to
1063
keep, and delete it when you are done.
1065
def __init__(self, limbo_dir):
1066
BzrNewError.__init__(self)
1067
self.limbo_dir = limbo_dir
1070
class ImmortalLimbo(BzrNewError):
1071
"""Unable to delete transform temporary directory $(limbo_dir)s.
1072
Please examine %(limbo_dir)s to see if it contains any files you wish to
1073
keep, and delete it when you are done.
1075
def __init__(self, limbo_dir):
1076
BzrNewError.__init__(self)
1077
self.limbo_dir = limbo_dir
1080
class OutOfDateTree(BzrNewError):
1081
"""Working tree is out of date, please run 'bzr update'."""
1167
BzrError.__init__(self, msg=msg)
1170
class NoDiff3(BzrError):
1172
_fmt = "Diff3 is not installed on this machine."
1175
class ExistingLimbo(BzrError):
1177
_fmt = """This tree contains left-over files from a failed operation.
1178
Please examine %(limbo_dir)s to see if it contains any files you wish to
1179
keep, and delete it when you are done."""
1181
def __init__(self, limbo_dir):
1182
BzrError.__init__(self)
1183
self.limbo_dir = limbo_dir
1186
class ImmortalLimbo(BzrError):
1188
_fmt = """Unable to delete transform temporary directory $(limbo_dir)s.
1189
Please examine %(limbo_dir)s to see if it contains any files you wish to
1190
keep, and delete it when you are done."""
1192
def __init__(self, limbo_dir):
1193
BzrError.__init__(self)
1194
self.limbo_dir = limbo_dir
1197
class OutOfDateTree(BzrError):
1199
_fmt = "Working tree is out of date, please run 'bzr update'."
1083
1201
def __init__(self, tree):
1084
BzrNewError.__init__(self)
1202
BzrError.__init__(self)
1085
1203
self.tree = tree
1088
class MergeModifiedFormatError(BzrNewError):
1089
"""Error in merge modified format"""
1092
class ConflictFormatError(BzrNewError):
1093
"""Format error in conflict listings"""
1096
class CorruptRepository(BzrNewError):
1097
"""An error has been detected in the repository %(repo_path)s.
1206
class MergeModifiedFormatError(BzrError):
1208
_fmt = "Error in merge modified format"
1211
class ConflictFormatError(BzrError):
1213
_fmt = "Format error in conflict listings"
1216
class CorruptRepository(BzrError):
1218
_fmt = """An error has been detected in the repository %(repo_path)s.
1098
1219
Please run bzr reconcile on this repository."""
1100
1221
def __init__(self, repo):
1101
BzrNewError.__init__(self)
1222
BzrError.__init__(self)
1102
1223
self.repo_path = repo.bzrdir.root_transport.base
1105
class UpgradeRequired(BzrNewError):
1106
"""To use this feature you must upgrade your branch at %(path)s."""
1226
class UpgradeRequired(BzrError):
1228
_fmt = "To use this feature you must upgrade your branch at %(path)s."
1108
1230
def __init__(self, path):
1109
BzrNewError.__init__(self)
1231
BzrError.__init__(self)
1110
1232
self.path = path
1113
class LocalRequiresBoundBranch(BzrNewError):
1114
"""Cannot perform local-only commits on unbound branches."""
1117
class MissingProgressBarFinish(BzrNewError):
1118
"""A nested progress bar was not 'finished' correctly."""
1121
class InvalidProgressBarType(BzrNewError):
1122
"""Environment variable BZR_PROGRESS_BAR='%(bar_type)s is not a supported type
1235
class LocalRequiresBoundBranch(BzrError):
1237
_fmt = "Cannot perform local-only commits on unbound branches."
1240
class MissingProgressBarFinish(BzrError):
1242
_fmt = "A nested progress bar was not 'finished' correctly."
1245
class InvalidProgressBarType(BzrError):
1247
_fmt = """Environment variable BZR_PROGRESS_BAR='%(bar_type)s is not a supported type
1123
1248
Select one of: %(valid_types)s"""
1125
1250
def __init__(self, bar_type, valid_types):
1126
BzrNewError.__init__(self, bar_type=bar_type, valid_types=valid_types)
1129
class UnsupportedOperation(BzrNewError):
1130
"""The method %(mname)s is not supported on objects of type %(tname)s."""
1251
BzrError.__init__(self, bar_type=bar_type, valid_types=valid_types)
1254
class UnsupportedOperation(BzrError):
1256
_fmt = "The method %(mname)s is not supported on objects of type %(tname)s."
1131
1257
def __init__(self, method, method_self):
1132
1258
self.method = method
1133
1259
self.mname = method.__name__
1134
1260
self.tname = type(method_self).__name__
1137
class BinaryFile(BzrNewError):
1138
"""File is binary but should be text."""
1141
class IllegalPath(BzrNewError):
1142
"""The path %(path)s is not permitted on this platform"""
1263
class BinaryFile(BzrError):
1265
_fmt = "File is binary but should be text."
1268
class IllegalPath(BzrError):
1270
_fmt = "The path %(path)s is not permitted on this platform"
1144
1272
def __init__(self, path):
1145
BzrNewError.__init__(self)
1273
BzrError.__init__(self)
1146
1274
self.path = path
1149
class TestamentMismatch(BzrNewError):
1150
"""Testament did not match expected value.
1277
class TestamentMismatch(BzrError):
1279
_fmt = """Testament did not match expected value.
1151
1280
For revision_id {%(revision_id)s}, expected {%(expected)s}, measured
1154
1283
def __init__(self, revision_id, expected, measured):
1155
1284
self.revision_id = revision_id
1156
1285
self.expected = expected
1157
1286
self.measured = measured
1160
class NotABundle(BzrNewError):
1161
"""Not a bzr revision-bundle: %(text)r"""
1289
class NotABundle(BzrError):
1291
_fmt = "Not a bzr revision-bundle: %(text)r"
1163
1293
def __init__(self, text):
1164
BzrNewError.__init__(self)
1294
BzrError.__init__(self)
1165
1295
self.text = text
1168
class BadBundle(BzrNewError):
1169
"""Bad bzr revision-bundle: %(text)r"""
1298
class BadBundle(BzrError):
1300
_fmt = "Bad bzr revision-bundle: %(text)r"
1171
1302
def __init__(self, text):
1172
BzrNewError.__init__(self)
1303
BzrError.__init__(self)
1173
1304
self.text = text
1176
1307
class MalformedHeader(BadBundle):
1177
"""Malformed bzr revision-bundle header: %(text)r"""
1179
def __init__(self, text):
1180
BzrNewError.__init__(self)
1309
_fmt = "Malformed bzr revision-bundle header: %(text)r"
1184
1312
class MalformedPatches(BadBundle):
1185
"""Malformed patches in bzr revision-bundle: %(text)r"""
1187
def __init__(self, text):
1188
BzrNewError.__init__(self)
1314
_fmt = "Malformed patches in bzr revision-bundle: %(text)r"
1192
1317
class MalformedFooter(BadBundle):
1193
"""Malformed footer in bzr revision-bundle: %(text)r"""
1195
def __init__(self, text):
1196
BzrNewError.__init__(self)
1319
_fmt = "Malformed footer in bzr revision-bundle: %(text)r"
1200
1322
class UnsupportedEOLMarker(BadBundle):
1201
"""End of line marker was not \\n in bzr revision-bundle"""
1324
_fmt = "End of line marker was not \\n in bzr revision-bundle"
1203
1326
def __init__(self):
1204
BzrNewError.__init__(self)
1207
class IncompatibleFormat(BzrNewError):
1208
"""Bundle format %(bundle_format)s is incompatible with %(other)s"""
1327
# XXX: BadBundle's constructor assumes there's explanatory text,
1328
# but for this there is not
1329
BzrError.__init__(self)
1332
class IncompatibleBundleFormat(BzrError):
1334
_fmt = "Bundle format %(bundle_format)s is incompatible with %(other)s"
1210
1336
def __init__(self, bundle_format, other):
1211
BzrNewError.__init__(self)
1337
BzrError.__init__(self)
1212
1338
self.bundle_format = bundle_format
1213
1339
self.other = other
1216
class BadInventoryFormat(BzrNewError):
1217
"""Root class for inventory serialization errors"""
1342
class BadInventoryFormat(BzrError):
1344
_fmt = "Root class for inventory serialization errors"
1220
1347
class UnexpectedInventoryFormat(BadInventoryFormat):
1221
"""The inventory was not in the expected format:\n %(msg)s"""
1349
_fmt = "The inventory was not in the expected format:\n %(msg)s"
1223
1351
def __init__(self, msg):
1224
1352
BadInventoryFormat.__init__(self, msg=msg)
1227
1355
class NoSmartServer(NotBranchError):
1228
"""No smart server available at %(url)s"""
1357
_fmt = "No smart server available at %(url)s"
1230
1359
def __init__(self, url):
1234
class UnknownSSH(BzrNewError):
1235
"""Unrecognised value for BZR_SSH environment variable: %(vendor)s"""
1363
class UnknownSSH(BzrError):
1365
_fmt = "Unrecognised value for BZR_SSH environment variable: %(vendor)s"
1237
1367
def __init__(self, vendor):
1238
BzrNewError.__init__(self)
1368
BzrError.__init__(self)
1239
1369
self.vendor = vendor
1242
class GhostRevisionUnusableHere(BzrNewError):
1243
"""Ghost revision {%(revision_id)s} cannot be used here."""
1372
class GhostRevisionUnusableHere(BzrError):
1374
_fmt = "Ghost revision {%(revision_id)s} cannot be used here."
1245
1376
def __init__(self, revision_id):
1246
BzrNewError.__init__(self)
1377
BzrError.__init__(self)
1247
1378
self.revision_id = revision_id
1250
class IllegalUseOfScopeReplacer(BzrNewError):
1251
"""ScopeReplacer object %(name)r was used incorrectly: %(msg)s%(extra)s"""
1381
class IllegalUseOfScopeReplacer(BzrError):
1383
_fmt = "ScopeReplacer object %(name)r was used incorrectly: %(msg)s%(extra)s"
1253
1385
is_user_error = False
1255
1387
def __init__(self, name, msg, extra=None):
1256
BzrNewError.__init__(self)
1388
BzrError.__init__(self)
1257
1389
self.name = name