Skip to content

Commit

Permalink
Catching errors too
Browse files Browse the repository at this point in the history
  • Loading branch information
judofyr committed May 21, 2008
1 parent 857203b commit 0bc3b72
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/camping-unabridged.rb
Original file line number Diff line number Diff line change
Expand Up @@ -581,8 +581,10 @@ def call(env)
e = H[env.to_hash]
k,m,*a=X.D e.PATH_INFO,(e.REQUEST_METHOD||'get').downcase
e.REQUEST_METHOD = m
con = k.new(e).service(*a)
con.to_a
k.new(e).service(*a).to_a
rescue => x
e.REQUEST_METHOD = 'r500'
X::I.new(e).service(k,m,x).to_a
end
# The Camping scriptable dispatcher. Any unhandled method call to the app module will
Expand Down

0 comments on commit 0bc3b72

Please sign in to comment.