Open dhperkins opened 6 years ago
an easy way to get this info out to callers who care might be to add an optional parameter to every method that takes a pointer to some kind of return code that defaults to null if the pointer is valid, an informative error is passed out this wouldn't require any changes in current code that uses mongoapi
JsonBox::Value MongoInterface::query(std::string collection, JsonBox::Value data)
would become
JsonBox::Value MongoInterface::query(std::string collection, JsonBox::Value data, aqt_Status *status = NULL)
it seems like most of our methods here catch mongo exceptions and print them to std::out they're as good as ignored