Thraben Heretic says:
{T}: Exile target creature card from a graveyard.
Undying says:
Undying (When this creature dies, if it had no +1/+1 counters on it, return it to the battlefield under its owner's control with a +1/+1 counter on it.)
So, when a creature with Undying dies, can I use Thraben Heretic to exile that creature from the graveyard before Undying resolves?