Skip to content

Commit

Permalink
show off amans new exceptions handling stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
raggi committed Sep 14, 2009
1 parent 2022589 commit 9d531a2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion examples/basic.ru
Expand Up @@ -4,6 +4,8 @@ require 'sinatra/async'
class AsyncTest < Sinatra::Base
register Sinatra::Async

enable :show_exceptions

aget '/' do
body "hello async"
end
Expand All @@ -12,6 +14,10 @@ class AsyncTest < Sinatra::Base
EM.add_timer(n.to_i) { body { "delayed for #{n} seconds" } }
end

aget '/raise' do
raise 'boom'
end

end

run AsyncTest.new
run AsyncTest.new

0 comments on commit 9d531a2

Please sign in to comment.