Permalink
Browse files

some exceptions dont have a #message method. Closes #30.

  • Loading branch information...
1 parent 7ff6f56 commit 9f892001695ca228e40c99008ddf85ee876d069b @technoweenie technoweenie committed Nov 19, 2010
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/faraday/error.rb
@@ -6,7 +6,9 @@ def initialize(exception)
end
def message
- @inner_exception.message
+ @inner_exception.respond_to?(:message) ?
+ @inner_exception.message :
+ @inner_exception.to_s
end
def backtrace

0 comments on commit 9f89200

Please sign in to comment.