Permalink
Browse files

added exception logging for connection failures

  • Loading branch information...
1 parent 43810a7 commit a2bc9bb767eef0187f462ec7ea4985c3617078fc @PRXci PRXci committed Nov 10, 2010
Showing with 8 additions and 1 deletion.
  1. +8 −1 lib/apn_on_rails/app/models/apn/app.rb
View
9 lib/apn_on_rails/app/models/apn/app.rb
@@ -54,7 +54,8 @@ def self.send_notifications_for_cert(the_cert, app_id)
end
end
end
- rescue
+ rescue Exception => e
+ log_connection_exception(e)
end
# end
end
@@ -140,5 +141,11 @@ def self.process_devices_for_cert(the_cert)
end
end
end
+
+
+ protected
+ def log_connection_exception(ex)
@mjankowski
mjankowski Jan 19, 2011

I think this should be a class method?

+ puts ex.message
+ end
end

0 comments on commit a2bc9bb

Please sign in to comment.