CSMongo.Responses.QueryResponse.CheckForExceptions C# (CSharp) Method

CheckForExceptions() public method

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