Why is it bad style to `rescue Exception => e` in Ruby?
摘要:Ryan Davis’sRuby QuickRefsays (without explanation):Don’t rescue Exception. EVER. or I will stab you.Why not? What’s the right thing to do?Exceptionis the root of Ruby's exception hierarchy, so when yourescue Exceptionyou rescue fromeverything, including subclasses such asSyntaxError,LoadError,
阅读全文
posted @ 2013-11-24 20:11
浙公网安备 33010602011771号