Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Commit

Permalink
Remove some plain "throw;"
Browse files Browse the repository at this point in the history
Usually, we want to re-throw what we caught in this case

Signed-off-by: Laurent Bonnans <[email protected]>
  • Loading branch information
lbonn committed Apr 22, 2020
1 parent 0f247d6 commit 6c95067
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/libaktualizr/config/config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ void Config::postUpdateValues() {
if (!tls.server_url_path.empty()) {
try {
tls.server = Utils::readFile(tls.server_url_path, true);
} catch (const boost::filesystem::filesystem_error& e) {
} catch (const std::exception& e) {
LOG_ERROR << "Couldn't read gateway URL: " << e.what();
tls.server = "";
}
Expand Down
2 changes: 1 addition & 1 deletion src/libaktualizr/crypto/p11engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ P11Engine::P11Engine(P11Config config) : config_(std::move(config)), ctx_(config
// an engine which has not been fully initialized
ENGINE_free(engine);
ENGINE_cleanup(); // for openssl < 1.1
throw;
throw exc;
}

ssl_engine_ = engine;
Expand Down
2 changes: 1 addition & 1 deletion src/libaktualizr/storage/sqlstorage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1924,7 +1924,7 @@ void SQLStorage::removeTargetFile(const std::string& target_name) {
boost::filesystem::remove(images_path_ / filename);
} catch (std::exception& e) {
LOG_ERROR << "Could not remove target file";
throw;
throw e;
}

db.commitTransaction();
Expand Down

0 comments on commit 6c95067

Please sign in to comment.