~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Robert Collins
  • Date: 2010-01-08 05:28:17 UTC
  • mto: This revision was merged to the branch mainline in revision 4944.
  • Revision ID: robertc@robertcollins.net-20100108052817-qt0ubq2sat7f08pt
Do not fiddle with exceptions in the pre_change_branch_tip hook running code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2942
2942
class HookFailed(BzrError):
2943
2943
    """Raised when a pre_change_branch_tip hook function fails anything other
2944
2944
    than TipChangeRejected.
 
2945
 
 
2946
    Note that this exception is no longer raised, and the import is only left
 
2947
    to be nice to code which might catch it in a plugin.
2945
2948
    """
2946
2949
 
2947
2950
    _fmt = ("Hook '%(hook_name)s' during %(hook_stage)s failed:\n"
2948
2951
            "%(traceback_text)s%(exc_value)s")
2949
2952
 
2950
2953
    def __init__(self, hook_stage, hook_name, exc_info):
 
2954
        warn("BzrError HookFailed has been deprecated as of bzrlib 2.1.",
 
2955
                DeprecationWarning)
2951
2956
        import traceback
2952
2957
        self.hook_stage = hook_stage
2953
2958
        self.hook_name = hook_name