Kmer-File-Format / kff-cpp-api

A C++ API to read and write kff files
GNU Affero General Public License v3.0
9 stars 8 forks source link

Document function that throws errors #17

Open lrobidou opened 1 month ago

lrobidou commented 1 month ago

Hi! I've read the README of this project to document the rust parser. I also read a bit of the C++ code and it appears some functions can throw an error but this is not documented. For instance: Kff_reader::Kff_reader calls Kff_file::Kff_file which calls Kff_file::open. This can throw std::runtime_error, but can also crash (exit(1)). This makes it difficult/impossible to exit gracefully on the client side. I have no idea how to easily document that in C++ :(