Closed reggi closed 9 years ago
I suppose I can use pretty-error
and skip via callback. But don't know how to have default default style.
Trying to create a "default-default" template. Could use help :cake:
var nullStyle = {
background: 'none',
display: 'inline',
color: 'none',
bullet: 'none',
marginLeft: 0,
marginRight: 0,
}
pe.appendStyle({
'pretty-error': _.defaults({}, nullStyle),
'pretty-error > header': nullStyle,
'pretty-error > header > title > kind': nullStyle,
'pretty-error > header > title > wrapper': nullStyle,
'pretty-error > header > colon': nullStyle,
'pretty-error > header > message': nullStyle,
'pretty-error > trace': nullStyle,
'pretty-error > trace > item': _.defaults({
}, nullStyle),
'pretty-error > trace > item > header': nullStyle,
'pretty-error > trace > item > header > pointer > file': nullStyle,
'pretty-error > trace > item > header > pointer > colon': nullStyle,
'pretty-error > trace > item > header > pointer > line': nullStyle,
'pretty-error > trace > item > header > what': nullStyle,
'pretty-error > trace > item > footer': nullStyle,
'pretty-error > trace > item > footer > addr': nullStyle,
'pretty-error > trace > item > footer > extra': nullStyle
})
Hey @reggi, reading your second and third comment, it looks like you've made progress on your own, so I'm not sure exactly what the question currently is. So could you rehash your question?
I create a module called
evalmd
that evaluates markdown files. Ideally I'd only want to show the trace of the markdown file. I don't expect this to be a feature of pretty-error, but I'd like to skip stack trace lines by extension. How after I edit a trace could I assemble the error again? I can't seem to overwrite theparsedError.trace
variable and throwparsedError
. @AriaMinaei thoughts?I'm I stuck having to stitch all the pieces together by hand? Or does
pretty-error
have a way to do this?Ideally I could:
parsedError.setTrace(trace)
parsedError
back to a errorparsedError.toError()