これもいみふめ。
まん中がsucc、最後がfailならこれでいいじゃん。
void func()
{
  if (step1()) {
    if (step2()) {
      if (step3()) {
        return SUCCESS;
      };
      step3_recovery();
     };
     step2_recovery();
    };
    step1_recovery();
  }
  return FAILED;
}