~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to doc/developers/HACKING.txt

  • Committer: John Arbash Meinel
  • Date: 2009-10-20 19:46:46 UTC
  • mfrom: (4759 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4771.
  • Revision ID: john@arbash-meinel.com-20091020194646-wnqpd15qs19y28z7
Merge bzr.dev 4759, bringing in static_tuple and streaming improvements.

Show diffs side-by-side

added added

removed removed

Lines of Context:
671
671
    may not catch every case but it's still useful sometimes.
672
672
 
673
673
 
 
674
Cleanup methods
 
675
===============
 
676
 
 
677
Often when something has failed later code, including cleanups invoked
 
678
from ``finally`` blocks, will fail too.  These secondary failures are
 
679
generally uninteresting compared to the original exception.  So use the
 
680
``only_raises`` decorator (from ``bzrlib.decorators``) for methods that
 
681
are typically called in ``finally`` blocks, such as ``unlock`` methods.
 
682
For example, ``@only_raises(LockNotHeld, LockBroken)``.  All errors that
 
683
are unlikely to be a knock-on failure from an previous failure should be
 
684
allowed.
 
685
 
 
686
 
674
687
Factories
675
688
=========
676
689