- From: Jake Archibald <notifications@github.com>
- Date: Tue, 23 Aug 2016 00:11:40 -0700
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
Received on Tuesday, 23 August 2016 07:12:08 UTC
@jdalton careful with using `.catch()` for logging, it means you've handled the error. Promises are async representations of try/catch, so you've written something like:
```js
try {
whatever();
}
catch (err) {
console.log("It failed");
}
console.log("It worked");
```
In the above, "It worked" will always be logged, since you handle the error. You probably want to re-throw the error if you're catching purely for logging.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/commit/e2a6d18647b97707c7a571163eef7838f82ca611#commitcomment-18738418
Received on Tuesday, 23 August 2016 07:12:08 UTC