|
The premise of this ticket is that mongocxx::operation_exception does not have a constructor which leaves the _raw_server_error member unset. This premise is not correct, as the inheriting constructors mongocxx:operation_exception declares from mongocxx::exception all leave _raw_server_error unset. mongocxx:operation_exception is actually usually constructed without a raw server error. This is presumably due to the fact that most libmongoc methods that perform database operations (e.g. mongoc_collection_count(), mongoc_collection_insert(), mongoc_collection_rename(), etc.) don't expose the raw reply document; they instead populate a bson_error_t* out-argument in the case of error, which does not contain the raw server reply.
As such, I'm closing this ticket "Works as Designed".
|