Closed keitakn closed 9 months ago
class MyError extends Error { static { this.prototype.name = "MyError"; } }
https://www.wantedly.com/companies/wantedly/post_articles/492456
this.name
name
Error.captureStackTrace(this, MyError);
こちらは https://github.com/nekochans/lgtm-cat-frontend/pull/284 で対応できたのでクローズ
Done の定義
補足情報
https://www.wantedly.com/companies/wantedly/post_articles/492456
this.name
が変化するのでname
は静的な値を定義するError.captureStackTrace(this, MyError);
のような記述は現代では不要