Exception: Exception
- Defined in:
- lib/exception.rb
Instance Method Summary collapse
Instance Method Details
#append_and_raise(*appends) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/exception.rb', line 3 def append_and_raise(*appends) = self. appends.each do |a| s = case a when String; a when Proc a.arity > 0 ? a.call(self) : a.call else raise "invalid append object: #{a.inspect}" end = case when /\S/ "#{}\n #{s}" else s end end raise self, , self.backtrace end |