J
junkone
How do i continue a loop after a exception? It actually captures the
exception . How do i get the exception handler to start executing from
4 to call the printstuff function?
def printStuff(inpu) ## just print stuff
puts "printing" + inpu.to_s
if (inpu==3)
raise RetryException.new(true)
end
# raise RuntimeError
end
def enter1
begin
[1,2,3,4,5,6,7,8].each{|value| printStuff(value)}#call function
to print.
rescue RetryException
puts " inside rescuedo nothing"
###QUESTION: how to continue calling
#puts dd.okToRetry
rescue
puts "other exception"
ensure
puts "insode ensire"
end
end
end
exception . How do i get the exception handler to start executing from
4 to call the printstuff function?
def printStuff(inpu) ## just print stuff
puts "printing" + inpu.to_s
if (inpu==3)
raise RetryException.new(true)
end
# raise RuntimeError
end
def enter1
begin
[1,2,3,4,5,6,7,8].each{|value| printStuff(value)}#call function
to print.
rescue RetryException
puts " inside rescuedo nothing"
###QUESTION: how to continue calling
#puts dd.okToRetry
rescue
puts "other exception"
ensure
puts "insode ensire"
end
end
end