Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide error code with directory create failure. #704

Merged
merged 2 commits into from
Jan 3, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Provide error code with directory create failure.
  • Loading branch information
evoskuil committed Jan 3, 2025

Verified

This commit was signed with the committer’s verified signature. The key has expired.
juliusknorr Julius Knorr
commit 3fe83b9e1236e35f7451342cf82cd709dc04d91f
4 changes: 2 additions & 2 deletions console/executor_store.cpp
Original file line number Diff line number Diff line change
@@ -59,9 +59,9 @@ bool executor::check_store_path(bool create) const
if (create)
{
logger(format(BN_INITIALIZING_CHAIN) % store);
if (!database::file::create_directory(store))
if (auto ec = database::file::create_directory_ex(store))
{
logger(format(BN_INITCHAIN_EXISTS) % store);
logger(format(BN_INITCHAIN_DIRECTORY_ERROR) % store % ec.message());
return false;
}
}
4 changes: 2 additions & 2 deletions console/localize.hpp
Original file line number Diff line number Diff line change
@@ -38,8 +38,8 @@ namespace node {
// --initchain
#define BN_INITIALIZING_CHAIN \
"Initializing %1% directory..."
#define BN_INITCHAIN_EXISTS \
"Failed because the directory %1% already exists."
#define BN_INITCHAIN_DIRECTORY_ERROR \
"Failed creating directory %1% with error '%2%'."
#define BN_INITCHAIN_CREATING \
"Please wait while creating the database..."
#define BN_INITCHAIN_CREATED \
Loading