public void CheckForExceptions() { BsonObject result = this.GetDefaultResponse(); if (result.Has("errmsg")) { throw new MongoServerException(result.Get<string>("errmsg", "Unknown database error!")); } }