vendor/plugins/assert_request/lib/assert_request.rb
def safe_assertion
      yield
    rescue RequestError
      logger.error "Bad request: #{$!}" 
      raise        
    end
# Run the given code wrapped in a rescue block, so that we temporarily trap 
# and log any RequestError exceptions that get raised.
Run the given code wrapped in a rescue block, so that we temporarily trap
and log any RequestError exceptions that get raised.
Run the given code wrapped in a rescue block so that we temporarily trap and log any RequestError exceptions that get raised .
def safe_assertion
      yield
    rescue RequestError
      logger.error "Bad request: #{$!}" 
      raise        
    end
def safe_assertion yield rescue RequestError logger . error "Bad request: #{$!}" raise end
Run the given code wrapped in a rescue block, so that we temporarily trap
and log any RequestError exceptions that get raised.
Run the given code wrapped in a rescue block so that we temporarily trap and log any RequestError exceptions that get raised .