Skip to content
This repository has been archived by the owner on Nov 15, 2019. It is now read-only.

Commit

Permalink
abort sub by throw an timax::rpc::exception
Browse files Browse the repository at this point in the history
  • Loading branch information
IndignantAngel committed Oct 12, 2016
1 parent 6771ef8 commit c0edcf7
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion rest_rpc/client/detail/async_sub_session.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,17 @@ namespace timax { namespace rpc
if (!error)
{
if (function_)
function_(response_.data(), response_.size());
{
try
{
function_(response_.data(), response_.size());
}
catch (exception const& error)
{
on_error(error);
return;
}
}

recv_sub_head();
}
Expand Down

0 comments on commit c0edcf7

Please sign in to comment.