More fixes in json_connection
This commit is contained in:
parent
891e880ad1
commit
c1eca45ef1
1 changed files with 6 additions and 9 deletions
|
|
@ -74,6 +74,7 @@ namespace fc { namespace rpc {
|
|||
if( m != obj.end() )
|
||||
{
|
||||
fc::exception except;
|
||||
bool exception_caught = false;
|
||||
try
|
||||
{
|
||||
auto p = obj.find("params");
|
||||
|
|
@ -134,17 +135,13 @@ namespace fc { namespace rpc {
|
|||
}
|
||||
catch ( fc::exception& e )
|
||||
{
|
||||
if( i != obj.end() )
|
||||
{
|
||||
except = e;
|
||||
}
|
||||
else
|
||||
{
|
||||
fc_wlog( _logger, "json rpc exception: ${exception}", ("exception",e) );
|
||||
}
|
||||
exception_caught = true;
|
||||
except = e;
|
||||
}
|
||||
if( i != obj.end() )
|
||||
if( exception_caught && i != obj.end() )
|
||||
send_error( i->value(), except );
|
||||
else
|
||||
fc_wlog( _logger, "json rpc exception: ${exception}", ("exception",except) );
|
||||
}
|
||||
else if( i != obj.end() ) //handle any received JSON response
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue