If I want to promisify all code paths in `myFunction`, do I need to create a `deferred` inside `myFunction`?

```
function myFunction(options) {
  if(!options) {
    throw 'foo'; // But I want the API for myFunction to be promise-based...
  } 

  return promiseBasedApi.doSomethingAndReturnPromise();
}

```