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

introduce exceptions hierarchy #164

Merged
merged 6 commits into from
Apr 13, 2022

Conversation

itrofimow
Copy link
Contributor

@itrofimow itrofimow commented Mar 15, 2022

Closes #145

Submitted on behalf of a third-party: Yandex N.V.

@Enmk
Copy link
Collaborator

Enmk commented Apr 4, 2022

Hi @itrofimow is it ready for review?

@itrofimow
Copy link
Contributor Author

itrofimow commented Apr 4, 2022

Hi!
I'll have a fresh look tomorrow, probably fix a couple of places, and then mark it as ready

As for now it lacks some tests

@itrofimow itrofimow marked this pull request as ready for review April 6, 2022 18:20
@itrofimow
Copy link
Contributor Author

I am not certain about what should be thrown instead of base Error in some places, but other than that i believe it's ready for review.

I didn't find any test for throwing logic, thus i didn't add any

@Enmk

@@ -38,7 +40,7 @@ void WireFormat::WriteAll(OutputStream& output, const void* buf, size_t len) {
}

if (len) {
throw std::runtime_error("Failed to write " + std::to_string(original_len)
throw Error("Failed to write " + std::to_string(original_len)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure what should be thrown here

clickhouse/client.cpp Outdated Show resolved Hide resolved
@Enmk Enmk merged commit 898ac2a into ClickHouse:master Apr 13, 2022
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.

Consider incorporating exceptions into type system
2 participants