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-1.0.1 lib/spiderfw/controller/first_responder.rb
spiderfw-1.0.0 lib/spiderfw/controller/first_responder.rb
spiderfw-0.6.39 lib/spiderfw/controller/first_responder.rb
spiderfw-0.6.38 lib/spiderfw/controller/first_responder.rb
spiderfw-0.6.37 lib/spiderfw/controller/first_responder.rb
spiderfw-0.6.35 lib/spiderfw/controller/first_responder.rb
spiderfw-0.6.34 lib/spiderfw/controller/first_responder.rb
spiderfw-0.6.33 lib/spiderfw/controller/first_responder.rb
spiderfw-0.6.32 lib/spiderfw/controller/first_responder.rb
spiderfw-0.6.31 lib/spiderfw/controller/first_responder.rb
spiderfw-0.6.30 lib/spiderfw/controller/first_responder.rb
spiderfw-0.6.29 lib/spiderfw/controller/first_responder.rb
spiderfw-0.6.28 lib/spiderfw/controller/first_responder.rb
spiderfw-0.6.27 lib/spiderfw/controller/first_responder.rb
spiderfw-0.6.26 lib/spiderfw/controller/first_responder.rb
spiderfw-0.6.26.pre1 lib/spiderfw/controller/first_responder.rb
spiderfw-0.6.25 lib/spiderfw/controller/first_responder.rb
spiderfw-0.6.24 lib/spiderfw/controller/first_responder.rb
spiderfw-0.6.23 lib/spiderfw/controller/first_responder.rb
spiderfw-0.6.22 lib/spiderfw/controller/first_responder.rb