File tree Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ const defaultGetMessage = function({
3737}
3838
3939const uncaughtException = function ( { error } ) {
40- return `an exception was thrown but not caught
40+ return ` ( an exception was thrown but not caught)
4141${ serialize ( error ) } `
4242}
4343
@@ -49,12 +49,12 @@ ${codeMessage}${detailMessage}${serialize(error)}`
4949}
5050
5151const unhandledRejection = function ( { promiseValue } ) {
52- return `a promise was rejected but not handled
52+ return ` ( a promise was rejected but not handled)
5353${ serialize ( promiseValue ) } `
5454}
5555
5656const rejectionHandled = function ( { promiseValue } ) {
57- return `a promise was rejected and handled too late
57+ return ` ( a promise was rejected and handled too late)
5858${ serialize ( promiseValue ) } `
5959}
6060
@@ -67,7 +67,7 @@ const multipleResolves = function({
6767 const again = promiseState === secondPromiseState ? ' again' : ''
6868 const state = again ? promiseState : 'resolve/rejected'
6969
70- return `a promise was ${ state } multiple times
70+ return ` ( a promise was ${ state } multiple times)
7171Initially ${ promiseState } with: ${ serialize ( promiseValue ) }
7272Then ${ secondPromiseState } ${ again } with: ${ serialize ( secondPromiseValue ) } `
7373}
Original file line number Diff line number Diff line change @@ -21,15 +21,13 @@ const prettify = function({
2121} ) {
2222 const [ explanation , firstLine , ...lines ] = message . split ( '\n' )
2323
24- // `warning` events do not have an `explanation`
25- const explanationA =
26- explanation === '' ? '' : ` ${ italic ( `(${ explanation } )` ) } `
27-
2824 // Add color, sign and `eventName` to first message line, and concatenate
2925 // `firstLine`
3026 const { COLOR , SIGN } = LEVELS [ level ]
3127 const header = colors [ COLOR ] (
32- `${ inverse ( bold ( ` ${ SIGN } ${ eventName } ${ explanationA } ` ) ) } ${ firstLine } ` ,
28+ `${ inverse (
29+ bold ( ` ${ SIGN } ${ eventName } ${ italic ( explanation ) } ` ) ,
30+ ) } ${ firstLine } `,
3331 )
3432
3533 // Add gray color and indentation to other lines.
You can’t perform that action at this time.
0 commit comments