Class: Sinatra::Base
- Inherits:
-
Object
- Object
- Sinatra::Base
- Defined in:
- lib/overwrite.rb
Instance Method Summary collapse
-
#halt(*response) ⇒ Object
overwriting halt to log halts (!= 202).
Instance Method Details
#halt(*response) ⇒ Object
overwriting halt to log halts (!= 202)
7 8 9 10 11 12 |
# File 'lib/overwrite.rb', line 7 def halt(*response) LOGGER.error "halt "+response.first.to_s+" "+(response.size>1 ? response[1].to_s : "") if response and response.first and response.first >= 300 # orig sinatra code: response = response.first if response.length == 1 throw :halt, response end |