void checkError(IMongo mongo) { var e = mongo.LastError().Error; if (e != null) { throw new Exception(e); } }