From 7c02b12449a55c215e8409fc81e2a820b77629e3 Mon Sep 17 00:00:00 2001 From: Falk Werner Date: Sun, 23 Feb 2020 23:25:17 +0100 Subject: [PATCH] fix: don't copy exceptions --- test/webfuse/mocks/mock_provider_client.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/webfuse/mocks/mock_provider_client.cc b/test/webfuse/mocks/mock_provider_client.cc index a906d95..a624ba3 100644 --- a/test/webfuse/mocks/mock_provider_client.cc +++ b/test/webfuse/mocks/mock_provider_client.cc @@ -42,7 +42,7 @@ static void webfuse_test_iproviderclient_onlookup( self->Lookup(parent, name, &buffer); wfp_respond_lookup(request, &buffer); } - catch (ProviderClientException ex) + catch (ProviderClientException& ex) { wfp_respond_error(request, ex.GetErrorCode()); } @@ -66,7 +66,7 @@ static void webfuse_test_iproviderclient_ongetattr( self->GetAttr(inode, &buffer); wfp_respond_getattr(request,&buffer); } - catch (ProviderClientException ex) + catch (ProviderClientException& ex) { wfp_respond_error(request, ex.GetErrorCode()); } @@ -90,7 +90,7 @@ static void webfuse_test_iproviderclient_onreaddir( self->ReadDir(directory, buffer); wfp_respond_readdir(request, buffer); } - catch (ProviderClientException ex) + catch (ProviderClientException& ex) { wfp_respond_error(request, ex.GetErrorCode()); } @@ -117,7 +117,7 @@ static void webfuse_test_iproviderclient_onopen( self->Open(inode, flags, &handle); wfp_respond_open(request, handle); } - catch (ProviderClientException ex) + catch (ProviderClientException& ex) { wfp_respond_error(request, ex.GetErrorCode()); } @@ -155,7 +155,7 @@ static void webfuse_test_iproviderclient_onread( self->Read(inode, handle, offset, length, data, &bytes_read); wfp_respond_read(request, data, bytes_read); } - catch (ProviderClientException ex) + catch (ProviderClientException& ex) { wfp_respond_error(request, ex.GetErrorCode()); }