Skip to content

Commit

Permalink
Return a slightly less verbose error message with merb.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Donovan committed Jul 15, 2008
1 parent 2d0141b commit 6c8dfa9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions servers/merb-core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@

class Campfire < Merb::Controller
def index
GithubCampfire.new(params[:payload])
"OMGPONIES! IT WORKED"
begin
GithubCampfire.new(params[:payload])
"OMGPONIES! IT WORKED"
rescue => e
self.status = 500
return "An exception has occurred posting the payload to Campfire:\n" +
e.backtrace.map {|frame| " #{frame}"}.join("\n")
end
end
end

Expand Down

0 comments on commit 6c8dfa9

Please sign in to comment.