From: "Michal M." Date: 2012-04-13T18:45:18+09:00 Subject: Re: How to make the "rescue" expression in a method dongcan z. wrote in post #1056289: > So it's my trouble.I want to make a method to handle exception very > carefully.So I want the "resuce" and other expressions in a method.But > if the "rescue" in a method,you know, it can not catch the exceptions > outside the method. You can rewrite the exception handling method to accept a block and enclose the block in begin-rescue-end: class Class def self.ex_handle begin yield rescue Exception puts $! end end end Class::ex_handle { puts 1/0 } -- Posted via http://www.ruby-forum.com/.