From 1eafd5f5c977984d2e4ab898e0eb4eacb298185b Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Wed, 23 Feb 2022 17:56:37 +0000 Subject: [PATCH] Catch exception by reference --- examples/sfc_pres_temp_rd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/sfc_pres_temp_rd.cpp b/examples/sfc_pres_temp_rd.cpp index d129286..2ccbeb6 100644 --- a/examples/sfc_pres_temp_rd.cpp +++ b/examples/sfc_pres_temp_rd.cpp @@ -149,7 +149,7 @@ int main(void) //cout << "*** SUCCESS reading example file sfc_pres_temp.nc!" << endl; return 0; } - catch(NcException e) + catch(NcException& e) { cout<<"FAILURE**************************\n"; cout << e.what() << endl;