Hi Jordan,
Is there any error message with the exception?
Generally in an ArcGIS Pro add-in it's better to use the Editor. This adds your edit to the operation stack for undo/redo and refreshes the map. An example of creating a feature using the Editor can be found here.
If you do want to use the low-level editing routines, perhaps because this is a CoreHost application, you should adjust your use of Dispose/using and add a transaction as follows:
using (Geodatabase geodb = ObtainGeodatabaseWithCodeYouDidntShow())
{
geodb.ApplyEdits(()=>
{
using (FeatureClass fc = geodb.OpenDataset<FeatureClass>("6"))
using (RowBuffer rowBuffer = fc.CreateRowBuffer();
{
rowBuffer["SHAPE"] = poly;
fc.CreateRow(rowBuffer).Dispose();
}
});
}
I hope this helps.
--Rich