diff OrthancFramework/Sources/SystemToolbox.cpp @ 4402:b651989194d3

fix for older compilers
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 23 Dec 2020 15:16:37 +0100
parents 80fd140b12ba
children d9473bd5ed43
line wrap: on
line diff
--- a/OrthancFramework/Sources/SystemToolbox.cpp	Wed Dec 23 15:13:45 2020 +0100
+++ b/OrthancFramework/Sources/SystemToolbox.cpp	Wed Dec 23 15:16:37 2020 +0100
@@ -244,7 +244,7 @@
     {
       throw OrthancException(ErrorCode_InexistentFile);
     }
-    catch (std::system_error&)
+    catch (...)  // To catch "std::system_error&" in C++11
     {
       throw OrthancException(ErrorCode_InexistentFile);
     }
@@ -306,7 +306,7 @@
     {
       throw OrthancException(ErrorCode_InexistentFile);
     }
-    catch (std::system_error&)
+    catch (...)  // To catch "std::system_error&" in C++11
     {
       throw OrthancException(ErrorCode_InexistentFile);
     }
@@ -375,7 +375,7 @@
     {
       throw OrthancException(ErrorCode_CannotWriteFile);
     }
-    catch (std::system_error&)
+    catch (...)  // To catch "std::system_error&" in C++11
     {
       throw OrthancException(ErrorCode_CannotWriteFile);
     }
@@ -429,7 +429,7 @@
     {
       throw OrthancException(ErrorCode_InexistentFile);
     }
-    catch (std::system_error&)
+    catch (...)  // To catch "std::system_error&" in C++11
     {
       throw OrthancException(ErrorCode_InexistentFile);
     }