> -----Original Message----- > From: Danny Trebbien [mailto:dtrebb...@gmail.com] > Sent: zondag 13 februari 2011 21:00 > To: Subversion Development > Subject: [PATCH] extend the SVN_ERR macro with a cleanup statement > parameter > > Attached is a small patch to extend the SVN_ERR macro with another > parameter, a cleanup statement, that is executed before the error > generated by EXPR (if not SVN_NO_ERROR) is returned. Also attached is > a log message. > > I plan on using this in a test of svn_subst_translate_string2() in > which I need to reset the locale to whatever it was before the test > began. See: http://thread.gmane.org/gmane.comp.version- > control.subversion.devel/125782
It's much easier to use a helper function or (if that is impossible) a goto to get specialized error handling. This macro is in use everywhere inside Subversion and in many third party tools using our libraries so I would recommend to not change it. Another option is a file local macro that performs your specialized cleanup. All those options are used in multiple places in our codebase. Bert