Skip to content

310 exception throwing

Afonso Mukai requested to merge 310_exception_throwing into master

Created by: mchorazak

Description of work

Both FlatbufferReaderRegistry::find(std::string const &FlatbufferID) and HDFWriterModuleRegistry::find(std::string const &key) now use std::map::at to look for map entries. std::map::at throws std::out_of_range if there is no value corresponding to a given key. This is handled appropriately whenever find is called.

Closes #310 (closed) Closes #313 (closed)

Acceptance Criteria

FlatbufferReaderRegistry::find(std::string const &FlatbufferID) HDFWriterModuleRegistry::find(std::string const &key)

Unit Tests

Adjusted (WriterRegistrationTest, StrKeyNotFound) to expect out_of_range errors.


Code Review (To be filled in by the reviewer only)

  • Is the code of an acceptable quality?
  • Do the changes function as described and is it robust?

Nominate for Group Code Review (Anyone can nominate it)

Indicate if you think the code should be reviewed in a Thursday code review session.

  • Recommend for group code review

Also, nominate it on the code_review Slack channel (does someone want to automate this?).

Merge request reports