Sha256: 0b87ace91e2c62eedc8881a2b89284d316298a04ed497b8dfff3ba9f4b453c68

Contents?: true

Size: 1.23 KB

Versions: 35

Compression:

Stored size: 1.23 KB

Contents

module Spider
    
    module FirstResponder
        
        def before(action='', *arguments)
            # if Spider.conf.get('profiling.enable') && @request.env['QUERY_STRING'] =~ /profile=true/
            #     @profiling_started = Spider::Profiling.start
            # end
            catch :done do
                begin
                    super
                rescue => exc
                    self.done = true
                    try_rescue(exc)
                end
            end
        end
        
        def execute(action='', *arguments)
            catch :done do
                begin
                    super
                rescue => exc
                    self.done = true
                    try_rescue(exc)
                end
            end
        end
        
        def after(action='', *arguments)
            catch :done do
                begin
                    super
                rescue => exc
                    self.done = true
                    try_rescue(exc)
                end
            end
            # Spider::Profiling.stop if (@profiling_started)
            
        end
        
        def try_rescue(exc)
            super
            self.done = true
        end
        
        
    end
    
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
spiderfw-0.6.21 lib/spiderfw/controller/first_responder.rb
spiderfw-0.6.20 lib/spiderfw/controller/first_responder.rb
spiderfw-0.6.19 lib/spiderfw/controller/first_responder.rb
spiderfw-0.6.18 lib/spiderfw/controller/first_responder.rb
spiderfw-0.6.17 lib/spiderfw/controller/first_responder.rb
spiderfw-0.6.16 lib/spiderfw/controller/first_responder.rb
spiderfw-0.6.15 lib/spiderfw/controller/first_responder.rb
spiderfw-0.6.14 lib/spiderfw/controller/first_responder.rb
spiderfw-0.6.13 lib/spiderfw/controller/first_responder.rb
spiderfw-0.6.12 lib/spiderfw/controller/first_responder.rb
spiderfw-0.6.11 lib/spiderfw/controller/first_responder.rb
spiderfw-0.6.10 lib/spiderfw/controller/first_responder.rb
spiderfw-0.6.9 lib/spiderfw/controller/first_responder.rb
spiderfw-0.6.8 lib/spiderfw/controller/first_responder.rb
spiderfw-0.6.7 lib/spiderfw/controller/first_responder.rb