quartz/trace.ts
@@ -1,11 +1,14 @@ import chalk from "chalk" import process from "process" const rootFile = /.*at file:/ export function trace(msg: string, err: Error) { const stack = err.stack console.log() console.log( chalk.bgRed.white.bold(" ERROR ") + "\n" + chalk.bgRed.black.bold(" ERROR ") + "\n" + chalk.red(` ${msg}`) + (err.message.length > 0 ? `: ${err.message}` : ""), ) @@ -26,4 +29,5 @@ } } } process.exit(1) }