This commit is contained in:
Ilya Kantor 2017-04-17 21:45:55 +02:00
parent a4a16fccd6
commit 57dc058c49
4 changed files with 9 additions and 9 deletions

View file

@ -212,9 +212,9 @@ For instance:
```js run
new Promise(function(resolve, reject) {
throw new Error("Woops!");
throw new Error("Whoops!");
}).catch(function(error) {
alert(error.message); // Whoops
alert(error.message); // Whoops!
});
## Inheriting from promise, thenables, error handling?
@ -248,11 +248,11 @@ new Promise(function(resolve, reject) {
setTimeout(() => resolve(1), 1000);
}).then(function(result) {
throw new Error("Woops!");
throw new Error("Whoops!");
}).catch(function(error) {
alert(error.message); // Woops!
alert(error.message); // Whoops!
});
```