improve error handling while serving
This commit is contained in:
parent
fd7c33c537
commit
ae2e3b463a
8 changed files with 56 additions and 28 deletions
|
@ -5,7 +5,9 @@ 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}` : ""),
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue