Why does this prog still stop after exception

i thought i put enough exception handlers for the prog to continue
after failure. why does it stop
require ‘imDaveAlerts’
require “timeoutx”

while(true)
puts Time.now
begin
TimeoutX.timeout(15){
begin
a=DaveAlerts.new
a.doAlerts()
rescue => detail
print detail.backtrace.join("\n")
end
}
rescue => detail
print detail.backtrace.join("\n")
end
sleep(5)
end

Wc:/ruby/lib/ruby/gems/1.8/gems/timeoutx-0.3.0/lib/timeoutx.rb:40:in
wait': execution expired (TimeoutX::Error) from c:/ruby/lib/ruby/gems/1.8/gems/xmpp4r-0.3.2/lib/xmpp4r/ semaphore.rb:23:insynchronize’
from c:/ruby/lib/ruby/gems/1.8/gems/xmpp4r-0.3.2/lib/xmpp4r/
semaphore.rb:23:in wait' from c:/ruby/lib/ruby/gems/1.8/gems/xmpp4r-0.3.2/lib/xmpp4r/stream.rb: 284:inwait’
from c:/ruby/lib/ruby/gems/1.8/gems/xmpp4r-0.3.2/lib/xmpp4r/stream.rb:
349:in send' from c:/ruby/lib/ruby/gems/1.8/gems/xmpp4r-0.3.2/lib/xmpp4r/stream.rb: 379:insend_with_id’
from c:/ruby/lib/ruby/gems/1.8/gems/xmpp4r-0.3.2/lib/xmpp4r/client.rb:
184:in auth_nonsasl' from c:/ruby/lib/ruby/gems/1.8/gems/xmpp4r-0.3.2/lib/xmpp4r/client.rb: 113:inauth’
from ./sendIM.rb:14:in sendMessage' from ./imDaveAlerts.rb:20:indoAlerts’
from ./imDaveAlerts.rb:17:in each' from ./imDaveAlerts.rb:17:indoAlerts’
from myCron.rb:10
from c:/ruby/lib/ruby/gems/1.8/gems/timeoutx-0.3.0/lib/timeoutx.rb:
58:in `timeout’
from myCron.rb:7

Alle Thursday 18 September 2008, Junkone ha scritto:

    a=DaveAlerts.new

Wc:/ruby/lib/ruby/gems/1.8/gems/timeoutx-0.3.0/lib/timeoutx.rb:40:in
`wait’: execution expired (TimeoutX::Error)

If no exception class is specified, rescue only rescues exceptions
derived
from StandardError, which TimeoutX::Error is not. If you want to rescue
all
exceptions, you need to explicitly write

rescue Exception

I hope this helps

Stefano