mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-01 21:55:50 +00:00
But only non-validation error paths. When validating we do expect it to maybe fail, so we don't want to generate cores for validation. Validation is in fact a de-serialization pass with some additional checks. To be able to keep reusing the same code for de-serialization and validation just with different error handling, introduce a `strict_mode` flag that can be passed to `composite::iterator` constructor. When in strict mode (the default) the iterator will convert any `marshal_exception` thrown during the de-serialization to `on_internal_error()`. We don't want anybody to use the iterator in non-strict mode, besides validation, so the iterator constructors are made private. This is standard practice for iterators anyway.