Refactored to reduce duplication in panic/error logic
Refactored to reduce duplication in panic/error logic

Pushed function call and panic handling into a child function to allow
panics to be part of the sane retry logic

FigmentEngine/mngerror