function getFoo () {
  return new Promise(function (resolve, reject){
    resolve('foo');
  });
}

function run (generator) {
  var it = generator();

  function go(result) {
    if (result.done) return result.value;
    
    return result.value.then(function (value) {
      return go(it.next(value));
    }, function (error) {
      return go(it.throw(value));
    });
    
  }

  go(it.next());
}

run(function* () {
  try {
    var foo = yield getFoo();
    console.log(foo);
  } catch (e) {
    console.log(e);
  }
});

@@ -347,21 +347,21 @@
 t.throw(
-value
+error
 ));%0A    

fix arguments in promise reject