Permalink
Browse files

move error definition into tweetstream module

  • Loading branch information...
1 parent 2bcb828 commit 65feb1b50e81c24ac2430e65fe60958385a549f1 @stve stve committed Jul 7, 2012
Showing with 9 additions and 16 deletions.
  1. +9 −1 lib/tweetstream.rb
  2. +0 −15 lib/tweetstream/error.rb
View
@@ -1,11 +1,19 @@
require 'tweetstream/configuration'
require 'tweetstream/client'
-require 'tweetstream/error'
require 'tweetstream/daemon'
module TweetStream
extend Configuration
+ class ReconnectError < StandardError
+ attr_accessor :timeout, :retries
+ def initialize(timeout, retries)
+ self.timeout = timeout
+ self.retries = retries
+ super("Failed to reconnect after #{retries} tries.")
+ end
+ end
+
class << self
# Alias for TweetStream::Client.new
#
View
@@ -1,15 +0,0 @@
-module TweetStream
- class Terminated < ::StandardError; end
- class Error < ::StandardError; end
- class ConnectionError < TweetStream::Error; end
- # A ReconnectError is raised when the maximum number of retries has
- # failed to re-establish a connection.
- class ReconnectError < StandardError
- attr_accessor :timeout, :retries
- def initialize(timeout, retries)
- self.timeout = timeout
- self.retries = retries
- super("Failed to reconnect after #{retries} tries.")
- end
- end
-end

0 comments on commit 65feb1b

Please sign in to comment.