mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
fix: handle string errors
This commit is contained in:
parent
3f83921c71
commit
5d0deefa6a
@ -10,9 +10,9 @@ export const printWarn = function (msg, from) {
|
||||
}
|
||||
|
||||
export const renderError = function (_error, from) {
|
||||
const errStr = _error.stack
|
||||
const errStr = _error.stack || String(_error)
|
||||
const fromStr = from ? Chalk.red(` ${from}`) : ''
|
||||
return '\n' + Chalk.bgRed.black(' ERROR ') + fromStr + '\n\n' + errStr
|
||||
return '\n' + Chalk.bgRed.black(' ERROR ') + fromStr + ' ' + errStr
|
||||
}
|
||||
|
||||
export const printError = function () {
|
||||
|
Loading…
Reference in New Issue
Block a user