Exception: Sinatra::ServerError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/sinatra/compat.rb

Overview

The ServerError exception is deprecated. Any exception is considered an internal server error.

Instance Method Summary collapse

Constructor Details

#initialize(*args, &block) ⇒ ServerError

Returns a new instance of ServerError.



70
71
72
73
# File 'lib/sinatra/compat.rb', line 70

def initialize(*args, &block)
  sinatra_warn 'Sinatra::ServerError is deprecated;',
    'use another exception, error, or Kernel#fail instead.'
end

Instance Method Details

#codeObject



74
# File 'lib/sinatra/compat.rb', line 74

def code ; 500 ; end