You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
In this blog post, we examine the ECMAScript proposal “Error cause” (by Chengzhong Wu and Hemanth HM). It describes a feature where instances of Error can optionally specify that they were caused by another error. Why would we want to chain errors? # Sometimes, we catch errors that are thrown during a more deeply nested function call and would like to attach more information to it: function readF
このとき、他のモジュールから持ってきた Error サブクラスは、本当に判定したいと思っているクラスであるかどうかを一考する必要があります。 deno-unknownutil という実際に存在するモジュールを使って説明していきます。以下のコードは実行できるようにしています。 ( deno v1.14.3 で確認 ) // mod1.ts import { ensureString } from "https://deno.land/x/unknownutil@v1.1.0/mod.ts"; export const myCoolHandler = (get: () => unknown): string => { const v = get(); ensureString(v); return v.substring(1); }; // mod2.ts import { EnsureErr
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く