Replies: 3 comments 4 replies
|
Could you give some disadvantage of C++ exception? |
1 reply
|
Exceptions have a very large performance loss compared to Status, and try catch has roughly 10 times the performance loss of an if statement. There is a benchmark https://quick-bench.com/q/7GrS5_yZDwcouuCPX-oJoMh2b2k |
1 reply
|
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There are 3 status code in doris: AgentStatus, OLAPStatus, Status and I am trying to unify them to Status. But I find there are too many rubbish code when using status code. For example:
and this:
Most of these code is useless....
The error message should contain 3 components:
I find maybe we could just use CPP Exception to simplify programming and error messages. And the caller method do not need to check the return value in most times.
All reactions