class SimpleException { }class RecommendExc extends Error { constructor(msg: string) { super(msg); // 显式设置原型。 Object.setPrototypeOf(this, RecommendExc.prototype) }}throw new RecommendExc("exeption")