vendor/bundle/ruby/1.8/gems/emissary-1.3.13/lib/emissary/agent/mysql.rb
def valid?
      begin
        !!connection
      rescue => e
        false			# Don't throw an exception, just return false.
      ensure 
        disconnect if connected? 
      end
    end
# Test whether our login info is valid by attempting a database 
# connection.  
Test whether our login info is valid by attempting a database
connection.
Test whether our login info is valid by attempting a database connection .
def valid?
      begin
        !!connection
      rescue => e
        false			
      ensure 
        disconnect if connected? 
      end
    end
def valid? begin ! ! connection rescue => e false ensure disconnect if connected? end end
Test whether our login info is valid by attempting a database
connection.
Test whether our login info is valid by attempting a database connection .
# Don't throw an exception, just return false.