Skip to content

Commit

Permalink
return backtrace with exception
Browse files Browse the repository at this point in the history
  • Loading branch information
yaauie committed Apr 24, 2012
1 parent b941bba commit 4e7b8e7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ruby/lib/redisrpc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def send( method_name, *args)
response_queue = @message_queue + ':rpc:' + rand_string
rpc_request = {'function_call' => function_call, 'response_queue' => response_queue}
rpc_raw_request = MultiJson.dump rpc_request

# transport
@redis_server.rpush @message_queue, rpc_raw_request
message_queue, rpc_raw_response = @redis_server.blpop response_queue, @timeout
Expand Down Expand Up @@ -115,7 +116,7 @@ def run_one
return_value = @local_object.send( function_call['name'].to_sym, *function_call['args'] )
rpc_response = {'return_value' => return_value}
rescue Object => err
rpc_response = {'exception' => err.to_s}
rpc_response = {'exception' => err.to_s, 'backtrace' => err.backtrace}
end

# response tansport
Expand Down

0 comments on commit 4e7b8e7

Please sign in to comment.