I don't understand why this code is not working properly:
def test
raise Exception.new 'error'
end
def caller
begin
test
rescue =>e
puts e.message
end
end
caller
I want to catch the test exception in the caller
method, but it seems that the caller
method is not catching anything.