File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -701,7 +701,7 @@ bool Client::Impl::ReceiveData() {
701701}
702702
703703bool Client::Impl::ReceiveException (bool rethrow) {
704- std::unique_ptr <Exception> e (new Exception);
704+ std::shared_ptr <Exception> e (new Exception);
705705 Exception* current = e.get ();
706706
707707 bool exception_received = true ;
@@ -742,7 +742,7 @@ bool Client::Impl::ReceiveException(bool rethrow) {
742742 }
743743
744744 if (rethrow || options_.rethrow_exceptions ) {
745- throw ServerError (std::move (e) );
745+ throw ServerError (e );
746746 }
747747
748748 return exception_received;
Original file line number Diff line number Diff line change @@ -40,9 +40,9 @@ class CompressionError : public Error {
4040// Exception received from server.
4141class ServerException : public Error {
4242public:
43- ServerException (std::unique_ptr <Exception> e)
43+ ServerException (std::shared_ptr <Exception> e)
4444 : Error(std::string())
45- , exception_(std::move(e) )
45+ , exception_(e )
4646 {
4747 }
4848
@@ -59,7 +59,7 @@ class ServerException : public Error {
5959 }
6060
6161private:
62- std::unique_ptr <Exception> exception_;
62+ std::shared_ptr <Exception> exception_;
6363};
6464using ServerError = ServerException;
6565
You can’t perform that action at this time.
0 commit comments