[ap4r-devel] [374] trunk/ap4r/lib/ap4r/mongrel.rb: Misc: specify Exception for rescue clause.

shino at rubyforge.org shino at rubyforge.org
Mon Jan 28 01:57:38 EST 2008


Revision: 374
Author:   shino
Date:     2008-01-28 01:57:37 -0500 (Mon, 28 Jan 2008)

Log Message:
-----------
Misc: specify Exception for rescue clause.
!NOTE! a rescue clause without an exception type ONLY rescues subclasses of StandardError.

Modified Paths:
--------------
    trunk/ap4r/lib/ap4r/mongrel.rb

Modified: trunk/ap4r/lib/ap4r/mongrel.rb
===================================================================
--- trunk/ap4r/lib/ap4r/mongrel.rb	2008-01-28 06:02:26 UTC (rev 373)
+++ trunk/ap4r/lib/ap4r/mongrel.rb	2008-01-28 06:57:37 UTC (rev 374)
@@ -152,7 +152,7 @@
               head['Content-Type'] = 'text/plain'
               out.write mid
             end
-          rescue
+          rescue Exception
             response.start(500) do |head, out|
               head['Content-Type'] = 'text/plain'
               out.write "Failed to send message. #{request.body.string}"




More information about the ap4r-devel mailing list