From 26ec8a02629fa9c21b77dea3b3b9b3dc22ace50c Mon Sep 17 00:00:00 2001 From: Max De Marzi Date: Fri, 28 Feb 2014 10:11:19 -0600 Subject: [PATCH] adding to_s to errors --- lib/neography/errors.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/neography/errors.rb b/lib/neography/errors.rb index d7711b6..1541ced 100644 --- a/lib/neography/errors.rb +++ b/lib/neography/errors.rb @@ -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