Sha256: 519d37d034c148b393e34fb85b433b473b9985b5e5da213e51e3ef431c1cea30

Contents?: true

Size: 356 Bytes

Versions: 12

Compression:

Stored size: 356 Bytes

Contents

class RailsExceptionHandler

  def self.catch(&block)
    begin
      block.call
    rescue Exception => exception
      if(configuration.activate?)
        exception_handler = Handler.new({'REQUEST_METHOD' => "GET", "rack.input" => ""}, exception)
        exception_handler.handle_exception
      else
        raise exception
      end
    end
  end

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
rails_exception_handler-2.4.9 lib/rails_exception_handler/catcher.rb
rails_exception_handler-2.4.8 lib/rails_exception_handler/catcher.rb
rails_exception_handler-2.4.7 lib/rails_exception_handler/catcher.rb
rails_exception_handler-2.4.6 lib/rails_exception_handler/catcher.rb
rails_exception_handler-2.4.5 lib/rails_exception_handler/catcher.rb
rails_exception_handler-2.4.4 lib/rails_exception_handler/catcher.rb
rails_exception_handler-2.4.1 lib/rails_exception_handler/catcher.rb
rails_exception_handler-2.4.0 lib/rails_exception_handler/catcher.rb
rails_exception_handler-2.3.5 lib/rails_exception_handler/catcher.rb
rails_exception_handler-2.3.4 lib/rails_exception_handler/catcher.rb
rails_exception_handler-2.3.3 lib/rails_exception_handler/catcher.rb
rails_exception_handler-2.3.2 lib/rails_exception_handler/catcher.rb