Skip to content

Create core dir: dont crash if have no permissions#486

Merged
alexey-milovidov merged 9 commits intoClickHouse:masterfrom
proller:fix1
Feb 14, 2017
Merged

Create core dir: dont crash if have no permissions#486
alexey-milovidov merged 9 commits intoClickHouse:masterfrom
proller:fix1

Conversation

@proller
Copy link
Copy Markdown
Contributor

@proller proller commented Feb 13, 2017

No description provided.

catch (const std::exception & e)
{
logger().warning("Cannot create core_path directory [ " + core_path + " ]" + " what(): " + e.what());
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why catching just std::exception? Please note, that what() of std::exception will contain only exception name without descriptive message.
Double whitespace before core_path.
Why you embed path in square brackets and why there is padding with whitespace inside?

Poco::File(core_path).createDirectories();
try
{
Poco::File(core_path).createDirectories();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not to define static void tryCreateDirectories.

@alexey-milovidov alexey-milovidov merged commit ed659bb into ClickHouse:master Feb 14, 2017
loneylee pushed a commit to loneylee/ClickHouse that referenced this pull request Mar 19, 2024
liuneng1994 added a commit to liuneng1994/ClickHouse that referenced this pull request May 17, 2024
(cherry picked from commit 7a68146)
(cherry picked from commit b89fd4d)
(cherry picked from commit d57c922)
(cherry picked from commit 388a105)
liuneng1994 added a commit to liuneng1994/ClickHouse that referenced this pull request May 28, 2024
(cherry picked from commit 7a68146)
(cherry picked from commit b89fd4d)
(cherry picked from commit d57c922)
(cherry picked from commit 388a105)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants