diff --git a/src/Effect/Aff.js b/src/Effect/Aff.js index 190216e..a44656e 100644 --- a/src/Effect/Aff.js +++ b/src/Effect/Aff.js @@ -274,12 +274,18 @@ var Aff = function () { switch (status) { case STEP_BIND: status = CONTINUE; - step = bhead(step); - if (btail === null) { - bhead = null; - } else { - bhead = btail._1; - btail = btail._2; + try { + step = bhead(step); + if (btail === null) { + bhead = null; + } else { + bhead = btail._1; + btail = btail._2; + } + } catch (e) { + status = RETURN; + fail = util.left(e); + step = null; } break;