Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

redo passing parse error

  • Loading branch information...
commit 4c8a197169139ef93f242020fb6ff958b8c88d35 1 parent a7da429
Sokolov Yura funny-falcon authored
6 lib/tarantool/em_db.rb
View
@@ -66,7 +66,7 @@ def call(result)
if Exception === (result = _parse_iproto(result))
@feed.call result
else
- @feed.call @response.parse_response(result)
+ @feed.call @response.parse_response_for_cb(result)
end
end
end
@@ -94,7 +94,7 @@ def call(result=INITIAL)
when Exception
@feed.call result
else
- @feed.call @response.parse_response(result)
+ @feed.call @response.parse_response_for_cb(result)
end
end
end
@@ -131,7 +131,7 @@ def call(result=INITIAL)
@feed.call result
else
@replicas_origin.replace @replicas
- @feed.call @response.parse_response(result)
+ @feed.call @response.parse_response_for_cb(result)
end
end
end
3  lib/tarantool/request.rb
View
@@ -380,6 +380,9 @@ def call_callback(data)
def parse_response(data)
data
end
+ def parse_response_for_cb(data)
+ data
+ end
end
def _ping(cb)
_send_request(all_shards, :write, REQUEST_PING, EMPTY, WrapPing.new(cb))
12 lib/tarantool/response.rb
View
@@ -28,11 +28,7 @@ def call(data)
cb.call(data)
else
if (ret = return_code(data)) == 0
- call_callback begin
- parse_response(data)
- rescue StandardError => e
- e
- end
+ call_callback parse_response_for_cb(data)
else
data.gsub!("\x00", "")
cb.call CODE_TO_EXCEPTION[ret].new(ret, data)
@@ -48,6 +44,12 @@ def call_callback(result)
cb.call(Exception === result || get_tuples != :first ? result : result.first)
end
+ def parse_response_for_cb(data)
+ parse_response data
+ rescue StandardError => e
+ e
+ end
+
def parse_response(data)
return data if Exception === data
unless get_tuples
2  lib/tarantool/version.rb
View
@@ -1,4 +1,4 @@
module Tarantool
- VERSION = "0.4.3.7"
+ VERSION = "0.4.3.8"
RECORD_VERSION = "0.4.2.1"
end
Please sign in to comment.
Something went wrong with that request. Please try again.