I am trying to use basic controller exceptions for when my mongo DB
cannot connect. I have in my mongo lib code:
begin
db = Mongo::Connection.new(host, port).db(name)
rescue Mongo::ConnectionFailure => e
# we may not be running in merb, better check!!
raise Merb::ControllerExceptions::NotFound if
Module.constants.include?(:Merb)
end
This is not working. I see the Merb::ControllerExceptions::NotFound
being raised in the console, but merb does not render the not_found
page.
I realize I should be using a more appropriate exception such as
ServiceUnavailable but this gives me the same results and I am trying
to debug based on an exception that in other cases works.
Using merb 1.1.0.pre on ruby 1.9.1p243
thanks, Jon
--
You received this message because you are subscribed to the Google Groups
"merb" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/merb?hl=en.