[PATCH 5 of 9] util: validate and extract compression-related bundlespec parameters

Augie Fackler raf at durin42.com
Mon Apr 3 19:56:34 EDT 2017


> On Apr 3, 2017, at 5:55 PM, Gregory Szorc <gregory.szorc at gmail.com> wrote:
> 
> Yes (at the risk of not catching all exceptions and converting to the expected type). I figured the function is sufficiently narrow in scope that an "except Exception" is tolerable. It's not like we're swallowing KeyboardInterrupt and SystemExit here ;)

On the one hand, you’re probably right, but on the other, it’ll make debugging unintentional defects in the author’s decompression code super-annoying. I’d rather we were more narrow about the kinds of exceptions that are legal to throw from the called code here.

(If you think I’m being too orthodox about this, it’s possible, since I know I’m biasing hard towards long-term maintenance here.)


More information about the Mercurial-devel mailing list