Skip to content

Commit

Permalink
adding to_s to errors
Browse files Browse the repository at this point in the history
  • Loading branch information
maxdemarzi committed Feb 28, 2014
1 parent 0b01621 commit 26ec8a0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/neography/errors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ def initialize(message = nil, code = nil, stacktrace = nil, request = nil, index
end
end

def to_s
"NeographyError: \n--message: #{@message}, \n--code: #{@code}, \n--stacktrace: #{@stacktrace}, \n--request: #{@request}, \n--index: #{@index}"
end

# HTTP Authentication error
class UnauthorizedError < NeographyError; end

Expand Down

0 comments on commit 26ec8a0

Please sign in to comment.