Skip to content

Abort on std::out_of_range in debug builds#12704

Merged
alexey-milovidov merged 1 commit intoClickHouse:masterfrom
azat:abort-on-out_of_range
Jul 24, 2020
Merged

Abort on std::out_of_range in debug builds#12704
alexey-milovidov merged 1 commit intoClickHouse:masterfrom
azat:abort-on-out_of_range

Conversation

@azat
Copy link
Copy Markdown
Member

@azat azat commented Jul 23, 2020

This helps notice them in tests, same as:

  • std::logic_error
  • LOGICAL_ERROR

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

Cc: @akuzm
Refs: #12522
Refs: #12418

@robot-clickhouse robot-clickhouse added the pr-not-for-changelog This PR should not be mentioned in the changelog label Jul 23, 2020
This helps notice them in tests, same as:
- std::logic_error
- LOGICAL_ERROR
@azat azat force-pushed the abort-on-out_of_range branch from b437479 to eaaa454 Compare July 23, 2020 08:36
@akuzm akuzm self-assigned this Jul 23, 2020
@alexey-milovidov alexey-milovidov merged commit 7776adc into ClickHouse:master Jul 24, 2020
@azat
Copy link
Copy Markdown
Member Author

azat commented Jul 24, 2020

Egh, sorry, std::out_of_range inherited from std::logic_error, @alexey-milovidov can you revert this please?

gcc10:

../src/Server/TCPHandler.cpp: In member function ‘void DB::TCPHandler::runImpl()’:
../src/Server/TCPHandler.cpp:327:9: warning: exception of type ‘std::out_of_range’ will be caught                                        
  327 |         catch (const std::out_of_range & e)
      |         ^~~~~
../src/Server/TCPHandler.cpp:320:9: warning:    by earlier handler for ‘std::logic_error’                                                
  320 |         catch (const std::logic_error & e)
      |

@azat
Copy link
Copy Markdown
Member Author

azat commented Jul 24, 2020

And #12522 had been merged after CI passed on the #12418 (and that's why tests passed with out_of_range exception)

@azat azat deleted the abort-on-out_of_range branch July 24, 2020 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-not-for-changelog This PR should not be mentioned in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants