Ruby xml rpc error handling
        Posted  
        
            by stel
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by stel
        
        
        
        Published on 2010-05-03T19:01:32Z
        Indexed on 
            2010/05/04
            6:28 UTC
        
        
        Read the original article
        Hit count: 250
        
ruby-on-rails
I have a model
class Car
  @@RPCServer = XMLRPC::Client.new("localhost", "/", 8080)
  def self.count
    @@RPCServer.call("cars.count")
  end
end
If server is not running on localhost:8080 I've got a Errno::ECONNREFUSED error.
I want to display an error message to user, how can a handle this error? 
© Stack Overflow or respective owner