📅  最后修改于: 2022-03-11 15:03:56.303000             🧑  作者: Mango
try {
// code that throws error
throw new Error("The message");
} catch (error) {
// this will log just the error's message
console.error(error.message);
}
// output: "The message"