Skip to content

Commit

Permalink
Added NotAvailableError back into the mix
Browse files Browse the repository at this point in the history
* Makes sense to group timeout, invalid response, and limit errors
* Much less refactoring required for existing clients - just continue to rescue NotAvailableError
  • Loading branch information
mloughran committed Aug 21, 2009
1 parent 2b2ab41 commit 57fc92c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/api_cache.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
#
class APICache
class APICacheError < RuntimeError; end
class TimeoutError < APICacheError; end
class InvalidResponse < APICacheError; end
class CannotFetch < APICacheError; end
class NotAvailableError < APICacheError; end
class TimeoutError < NotAvailableError; end
class InvalidResponse < NotAvailableError; end
class CannotFetch < NotAvailableError; end

class << self
attr_accessor :logger
Expand Down

0 comments on commit 57fc92c

Please sign in to comment.