clickhouse-cpp icon indicating copy to clipboard operation
clickhouse-cpp copied to clipboard

API change: Column methods should throw exceptions consistently

Open Enmk opened this issue 3 years ago • 1 comments

There are multiple places throughout the library that are really relaxed about input values\types, like:

  • overrides of Column::Append(ColumnRef column) that just do nothing if column is of not expected type
  • overrides of Column::Load that return false if column failed to load, sometimes eating an exception that could point to the root cause.
  • etc.

Fixes scheduled for next API-breaking release (3.0?):

  • Column::Append overrides should throw an exception if the input column is of the wrong type.
  • Column::Load should change return type to void and throw an exception on error.

Enmk avatar Oct 31 '22 11:10 Enmk

Just like lib boost, error_code and exceptions are both supported if API-breaking is sure

1261385937 avatar Nov 06 '22 14:11 1261385937