JavaScript Promiseの本 v2Promise#catchとPromise#then Promise.reject(new Error("message")).catch((error) => { // エラーハンドリング }); // Promise#catchは次のPromise#thenと同じ意味 Promise.reject(new Error("message")).then(undefined, (error) => { // エラーハンドリング com/jakearchibald/es6-promise 30 JavaScript Promiseの本 const promise = Promise.reject(new Error("message")); promise.catch((error) => { console.error(error); }); このコードをそれぞれのブラウザで実行させると、IE8以下では実行する段階で とができます。 (もちろんpolyfillは必要です) Promise#catchの識別子エラーの回避 const promise = Promise.reject(new Error("message")); 35 http://mothereff.in/js-properties#catch 36 http://es5.github.io/#x7.6 37 http://es5.github0 码力 | 137 页 | 1.17 MB | 1 年前3
JavaScript Promiseの本 v1jakearchibald/es6- promise29 を利用しています。 Promise#catchの実行結果 var promise = Promise.reject(new Error("message")); promise.catch(function (error) { console.error(error); }); このコードをそれぞれのブラウザで実行させると、IE8以下では実行する段階で ることができます。 (もちろんpolyfillは必要です) Promise#catchの識別子エラーの回避 var promise = Promise.reject(new Error("message")); promise["catch"](function (error) { console.error(error); }); もしくは単純に catch を使わずに、 then then を使うことでも回避できます。 Promise#catchではなくPromise#thenを使う var promise = Promise.reject(new Error("message")); promise.then(undefined, function (error) { console.error(error); }); 31 http://es5.github0 码力 | 115 页 | 1.06 MB | 1 年前3
PlantUML 1.2019.3 言語リファレンスガイドauthentication Request Bob <- Alice : Another authentication Response autonumber 40 10 "Message 0 " Bob -> Alice : Yet another authentication Request Bob <- Alice : Yet another authentication Response Authentication Response autonumber stop Bob -> Alice : dummy autonumber resume "Message 0 " Bob -> Alice : Yet another authentication Request Bob <- Alice : Yet another authentication Response Response autonumber stop Bob -> Alice : dummy autonumber resume 1 "Message 0 " Bob -> Alice : Yet another authentication Request Bob <- Alice : Yet another authentication Response0 码力 | 160 页 | 1.80 MB | 1 年前3
PlantUML 1.2019.2 言語リファレンスガイドauthentication Request Bob <- Alice : Another authentication Response autonumber 40 10 "Message 0 " Bob -> Alice : Yet another authentication Request Bob <- Alice : Yet another authentication Response Authentication Response autonumber stop Bob -> Alice : dummy autonumber resume "Message 0 " Bob -> Alice : Yet another authentication Request Bob <- Alice : Yet another authentication Response Response autonumber stop Bob -> Alice : dummy autonumber resume 1 "Message 0 " Bob -> Alice : Yet another authentication Request Bob <- Alice : Yet another authentication Response0 码力 | 160 页 | 1.80 MB | 1 年前3
PlantUML を使った UML の描き方 - PlantUML 言語リファレンスガイド(Version 1.2019.1)authentication Request Bob <- Alice : Another authentication Response autonumber 40 10 "Message 0 " Bob -> Alice : Yet another authentication Request Bob <- Alice : Yet another authentication Authentication Response autonumber stop Bob -> Alice : dummy autonumber resume "Message 0 " Bob -> Alice : Yet another authentication Request Bob <- Alice : Yet another authentication authentication Response autonumber stop Bob -> Alice : dummy autonumber resume 1 "Message 0 " Bob -> Alice : Yet another authentication Request Bob <- Alice : Yet another authentication Response0 码力 | 148 页 | 1.92 MB | 1 年前3
PlantUML 1.2019.6 言語リファレンスガイドauthentication Request Bob <- Alice : Another authentication Response autonumber 40 10 "Message 0 " Bob -> Alice : Yet another authentication Request Bob <- Alice : Yet another authentication Response Authentication Response autonumber stop Bob -> Alice : dummy autonumber resume "Message 0 " Bob -> Alice : Yet another authentication Request Bob <- Alice : Yet another authentication Response Response autonumber stop Bob -> Alice : dummy autonumber resume 1 "Message 0 " Bob -> Alice : Yet another authentication Request Bob <- Alice : Yet another authentication Response0 码力 | 174 页 | 1.99 MB | 1 年前3
PlantUML 1.2019.4 言語リファレンスガイドauthentication Request Bob <- Alice : Another authentication Response autonumber 40 10 "Message 0 " Bob -> Alice : Yet another authentication Request Bob <- Alice : Yet another authentication Response Authentication Response autonumber stop Bob -> Alice : dummy autonumber resume "Message 0 " Bob -> Alice : Yet another authentication Request Bob <- Alice : Yet another authentication Response Response autonumber stop Bob -> Alice : dummy autonumber resume 1 "Message 0 " Bob -> Alice : Yet another authentication Request Bob <- Alice : Yet another authentication Response0 码力 | 168 页 | 1.90 MB | 1 年前3
PlantUML 1.2019.9 言語リファレンスガイドauthentication Request Bob <- Alice : Another authentication Response autonumber 40 10 "Message 0 " Bob -> Alice : Yet another authentication Request Bob <- Alice : Yet another authentication Response Authentication Response autonumber stop Bob -> Alice : dummy autonumber resume "Message 0 " Bob -> Alice : Yet another authentication Request Bob <- Alice : Yet another authentication Response Response autonumber stop Bob -> Alice : dummy autonumber resume 1 "Message 0 " Bob -> Alice : Yet another authentication Request Bob <- Alice : Yet another authentication Response0 码力 | 175 页 | 2.02 MB | 1 年前3
PlantUML 1.2020.23 言語リファレンスガイドauthentication Request Bob <- Alice : Another authentication Response autonumber 40 10 "Message 0 " Bob -> Alice : Yet another authentication Request Bob <- Alice : Yet another authentication Response / 305 1.9 タイトル、ヘッダー、フッター 1 シーケンス図 Bob -> Alice : dummy autonumber resume "Message 0 " Bob -> Alice : Yet another authentication Request Bob <- Alice : Yet another authentication Response Response autonumber stop Bob -> Alice : dummy autonumber resume 1 "Message 0 " Bob -> Alice : Yet another authentication Request Bob <- Alice : Yet another authentication Response0 码力 | 306 页 | 3.19 MB | 1 年前3
PlantUML を使った UML の描き方 - PlantUML 言語リファレンスガイド(Version 1.2020.22)authentication Request Bob <- Alice : Another authentication Response autonumber 40 10 "Message 0 " Bob -> Alice : Yet another authentication Request Bob <- Alice : Yet another authentication Response / 293 1.9 タイトル、ヘッダー、フッター 1 シーケンス図 Bob -> Alice : dummy autonumber resume "Message 0 " Bob -> Alice : Yet another authentication Request Bob <- Alice : Yet another authentication Response Response autonumber stop Bob -> Alice : dummy autonumber resume 1 "Message 0 " Bob -> Alice : Yet another authentication Request Bob <- Alice : Yet another authentication Response0 码力 | 294 页 | 3.11 MB | 1 年前3
共 20 条
- 1
- 2













