mongocxx 3.x insert will throw exception when duplicate key found

From: li ning <li.ning.cd@xxxxxxxxx>
To: mongodb-user <mongodb-user@xxxxxxxxxxxxxxxx>
Date: Tue, 19 Apr 2016 23:59:39 -0700 (PDT)
Why ads?
Not way to disable exception? Why not set error code in return value? Even 
the return type is a dedicated type "result"?

-- 
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.org/manual/support/
--- 
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+unsubscribe@xxxxxxxxxxxxxxxx.
To post to this group, send email to mongodb-user@xxxxxxxxxxxxxxxx.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/3f4b42f8-9a5b-464b-9b27-017c05ebb832%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Why ads?