CSMongo.Responses.QueryResponse.CheckForExceptions C# (CSharp) Méthode

CheckForExceptions() public méthode

Checks for a default response if there is an error
public CheckForExceptions ( ) : void
Résultat void
        public void CheckForExceptions()
        {
            BsonObject result = this.GetDefaultResponse();
            if (result.Has("errmsg")) {
                throw new MongoServerException(result.Get<string>("errmsg", "Unknown database error!"));
            }
        }