From: "dongcan z." Date: 2012-04-13T18:12:31+09:00 Subject: How to make the "rescue" expression in a method The code such as this: begin puts 1/0 Class::ex_handle end class Class def self.ex_handle rescue Exception puts $! end end The code above can not lead to an ideal result.It can not output the exception normally. However, the code if you change like this: begin puts 1/0 rescue Exception puts $! end It works! 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. Please give me a solution if you know. Thank you very much! -- Posted via http://www.ruby-forum.com/.