Preview:```ts
export class CustomError extends Error {
constructor(message: string) {
super(message)
this.name = "CustomError"
}
}
const foo = "throwCustomError"
if (foo === "throwCustomError") {
throw CustomError("Custom Error throws")
} else {
throw Error("Default Error class used")
...```
You can choose specific lines to embed by selecting them before copying the link.