~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Martin Packman
  • Author(s): John Arbash Meinel
  • Date: 2011-09-30 16:29:17 UTC
  • mto: (6015.33.7 2.4)
  • mto: This revision was merged to the branch mainline in revision 6192.
  • Revision ID: martin.packman@canonical.com-20110930162917-zilsfmiuxzsky4so
Return early to avoid malloc(0) in create_delta_index_from_delta

Show diffs side-by-side

added added

removed removed

Lines of Context:
1572
1572
            problem we can raise the original error (value from sys.exc_info())
1573
1573
        """
1574
1574
        BzrError.__init__(self)
1575
 
        self.context = context
1576
1575
        self.reload_occurred = reload_occurred
1577
1576
        self.exc_info = exc_info
1578
1577
        self.orig_error = exc_info[1]
1965
1964
        self.prefix = prefix
1966
1965
 
1967
1966
 
1968
 
class MalformedTransform(InternalBzrError):
 
1967
class MalformedTransform(BzrError):
1969
1968
 
1970
1969
    _fmt = "Tree transform is malformed %(conflicts)r"
1971
1970
 
3317
3316
    def __init__(self, source, target):
3318
3317
        self.source = source
3319
3318
        self.target = target
3320
 
 
3321
 
 
3322
 
class MissingFeature(BzrError):
3323
 
 
3324
 
    _fmt = ("Missing feature %(feature)s not provided by this "
3325
 
            "version of Bazaar or any plugin.")
3326
 
 
3327
 
    def __init__(self, feature):
3328
 
        self.feature = feature
3329
 
 
3330
 
 
3331
 
class ParseFormatError(BzrError):
3332
 
 
3333
 
    _fmt = "Parse error on line %(lineno)d of format name: %(line)s"
3334
 
 
3335
 
    def __init__(self, lineno, line, text):
3336
 
        BzrError.__init__(self)
3337
 
        self.lineno = lineno
3338
 
        self.line = line
3339
 
        self.text = text