vendor/bundle/ruby/1.8/gems/sinatra-1.2.8/lib/sinatra/base.rb
def error_block!(*keys)
      keys.each do |key|
        base = settings
        while base.respond_to?(:errors)
          if block = base.errors[key]
            # found a handler, eval and return result
            return instance_eval(&block)
          else
            base = base.superclass
          end
        end
      end
      raise boom if settings.show_exceptions? and keys == Exception
      nil
    end
# Find an custom error block for the key(s) specified.
Find an custom error block for the key(s) specified.
Find an custom error block for the key ( s ) specified .
def error_block!(*keys)
      keys.each do |key|
        base = settings
        while base.respond_to?(:errors)
          if block = base.errors[key]
            return instance_eval(&block)
          else
            base = base.superclass
          end
        end
      end
      raise boom if settings.show_exceptions? and keys == Exception
      nil
    end
def error_block! ( * keys ) keys . each do | key | base = settings while base . respond_to? ( :errors ) if block = base . errors [ key ] return instance_eval ( & block ) else base = base . superclass end end end raise boom if settings . show_exceptions? and keys == Exception nil end
Find an custom error block for the key(s) specified.
Find an custom error block for the key ( s ) specified .
# found a handler, eval and return result
keys