X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=CODINGSTYLE;h=0344157516773c0e1709fb07484c9e8b18408217;hb=82d951a8589b8bd5a3e61b4d0a7b70e8ef6f6231;hp=1bc76fadfb09cfabc548cf0cc6e33387848f7030;hpb=3a8a2c5f7b067708f1461d0d31d228c494a88801;p=bup.git diff --git a/CODINGSTYLE b/CODINGSTYLE index 1bc76fa..0344157 100644 --- a/CODINGSTYLE +++ b/CODINGSTYLE @@ -53,8 +53,10 @@ stack trace will be lost):: raise pending_ex If an exception is thrown from an exception handler, the pending -exception should be "chained" to the new exception as the context. -This can be accomplished via ``chain_ex()``:: +exception should be the `"context" +`_ +of the new exception This can be accomplished via +``add_ex_ctx()``:: try: ... @@ -64,6 +66,6 @@ This can be accomplished via ``chain_ex()``:: ... except ... as ex2: add_ex_tb(ex2) - raise chain_ex(ex2, ex) + raise add_ex_ctx(ex2, ex) See the end of ``lib/bup/compat.py`` for a functional example.