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() )
|
if( m != obj.end() )
|
||||||
{
|
{
|
||||||
fc::exception except;
|
fc::exception except;
|
||||||
|
bool exception_caught = false;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
auto p = obj.find("params");
|
auto p = obj.find("params");
|
||||||
|
|
@ -134,17 +135,13 @@ namespace fc { namespace rpc {
|
||||||
}
|
}
|
||||||
catch ( fc::exception& e )
|
catch ( fc::exception& e )
|
||||||
{
|
{
|
||||||
if( i != obj.end() )
|
exception_caught = true;
|
||||||
{
|
|
||||||
except = e;
|
except = e;
|
||||||
}
|
}
|
||||||
else
|
if( exception_caught && i != obj.end() )
|
||||||
{
|
|
||||||
fc_wlog( _logger, "json rpc exception: ${exception}", ("exception",e) );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if( i != obj.end() )
|
|
||||||
send_error( i->value(), except );
|
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
|
else if( i != obj.end() ) //handle any received JSON response
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue