Divide default communicator from DD communicators
[alexxy/gromacs.git] / src / gromacs / utility / futil.cpp
index 15c986a8d85863b4d35e045f54a4b5eb142987ff..b09c5403b8dc7849397d365d5cc44e0a1c311c28 100644 (file)
@@ -743,7 +743,9 @@ void gmx_chdir(const char* directory)
 #endif
     if (rc != 0)
     {
-        gmx_fatal(FARGS, "Cannot change directory to '%s'. Reason: %s", directory, strerror(errno));
+        auto message = gmx::formatString("Cannot change directory to '%s'. Reason: %s", directory,
+                                         strerror(errno));
+        GMX_THROW(gmx::FileIOError(message));
     }
 }