So we must build an entire class just for sake of more specific rescue
statements:
class MyError StandardError
end
try_counter = 0
begin
try_counter += 1
puts 'Here 1'
raise MyError.new Text unless try_counter 5
puts 'Here 2'
rescue MyError
puts 'Here 3 - MyError encountered'
retry
I would understand if there was some level of customization involved
that distinguishes it from the super class:
class DoubleRenderError Error
DEFAULT_MESSAGE = Render and/or redirect were called multiple
times in this action. Please note that you may only call render OR
redirect, and at
On Sunday, September 16, 2012 7:57:44 PM UTC+1, John Merlino wrote:
class ActionNotFound StandardError #:nodoc:
end
unless action_name = method_for_action(action_name)
raise ActionNotFound, The action '#{action}' could not be found for
#{self.class.name}
end
But why even
3 matches
Mail list logo