Taner Sener
unread,Sep 26, 2012, 3:12:42 PM9/26/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to lif...@googlegroups.com
Hi,
Sorry if I am asking an easy question but I'm stuck at this point and can't see what I'm missing.
I have a mongo db instance which is protected with username & password.
Username/password is defined by MongoDB.defineDbAuth(.., ..) on initialization
If I remove MongoDB.defineDbAuth(.., ..) line the following code still works without throwing an exception.
According to documentation, setting com.mongodb.WriteConcern.SAFE parameter should throw an exception if save fails. But at this point it is not thrown and my record is not inserted in db.
try {
myMongoRecord.save(com.mongodb.WriteConcern.SAFE)
} catch {
case t: Throwable => {
System.out.println("3")
}
}
Can you help me to understand the reason?
Thanks,