Permalink
Browse files

Raise NotConnected if a connection couldn't be made

  • Loading branch information...
1 parent f4eb787 commit d8c56383b923fc7d762a8698b0ddf511d872475d Peter Kieltyka committed Dec 15, 2009
Showing with 6 additions and 4 deletions.
  1. +4 −3 beanstalk-client.gemspec
  2. +2 −1 lib/beanstalk-client/connection.rb
View
@@ -9,19 +9,20 @@ Gem::Specification.new do |s|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Keith Rarick"]
- s.date = %q{2009-12-11}
+ s.date = %q{2009-12-15}
s.description = %q{Ruby client for beanstalkd}
s.email = %q{kr@xph.us}
s.extra_rdoc_files = [
"LICENSE",
- "README"
+ "README.rdoc"
]
s.files = [
".gitignore",
"LICENSE",
- "README",
+ "README.rdoc",
"Rakefile",
"VERSION",
+ "beanstalk-client.gemspec",
"lib/beanstalk-client.rb",
"lib/beanstalk-client/connection.rb",
"lib/beanstalk-client/errors.rb",
@@ -255,9 +255,10 @@ def connect()
@watch_list.each{|tube| @connections[addr].watch(tube)}
to_ignore.each{|tube| @connections[addr].ignore(tube)}
end
+ rescue Errno::ECONNREFUSED
+ raise NotConnected
rescue Exception => ex
puts "#{ex.class}: #{ex}"
- #puts begin ex.fixed_backtrace rescue ex.backtrace end
end
end
@connections.size

0 comments on commit d8c5638

Please sign in to comment.