fixed: rethrow exceptions using bare throw instead of making copies

This commit is contained in:
Arne Morten Kvarving 2025-01-23 10:45:32 +01:00
parent e108e4b8c1
commit 4d2b07432c
2 changed files with 4 additions and 4 deletions

View File

@ -978,7 +978,7 @@ void ChowPatelIlu<block_size>::gpu_decomposition(
OPM_THROW(std::logic_error, oss.str());
} catch (const std::logic_error& error) {
// rethrow exception by OPM_THROW in the try{}
throw error;
throw;
}
}

View File

@ -219,7 +219,7 @@ openclSolverBackend(int verbosity_,
OPM_THROW(std::logic_error, oss.str());
} catch (const std::logic_error& error) {
// rethrow exception by OPM_THROW in the try{}, without this, a segfault occurs
throw error;
throw;
}
}
@ -479,7 +479,7 @@ initialize(std::shared_ptr<BlockedMatrix<Scalar>> matrix,
OPM_THROW(std::logic_error, oss.str());
} catch (const std::logic_error& error) {
// rethrow exception by OPM_THROW in the try{}, without this, a segfault occurs
throw error;
throw;
}
initialized = true;
@ -649,7 +649,7 @@ solve_system(WellContributions<Scalar>& wellContribs, GpuResult& res)
OPM_THROW(std::logic_error, oss.str());
} catch (const std::logic_error& error) {
// rethrow exception by OPM_THROW in the try{}, without this, a segfault occurs
throw error;
throw;
}
if (verbosity > 2) {