| 28 | } |
| 29 | |
| 30 | void state::handle_reply( const response& response ) |
| 31 | { |
| 32 | auto await = _awaiting.find( response.id ); |
| 33 | FC_ASSERT( await != _awaiting.end(), "Unknown Response ID: ${id}", ("id",response.id)("response",response) ); |
| 34 | if( response.result ) |
| 35 | await->second->set_value( *response.result ); |
| 36 | else if( response.error ) |
| 37 | { |
| 38 | await->second->set_exception( std::make_exception_ptr( FC_EXCEPTION( exception, "${error}", ("error",response.error->message)("data",response) ) ) ); |
| 39 | } |
| 40 | else |
| 41 | await->second->set_value( fc::variant() ); |
| 42 | _awaiting.erase(await); |
| 43 | } |
| 44 | |
| 45 | request state::start_remote_call( const string& method_name, variants args ) |
| 46 | { |
no test coverage detected