mirror of
https://github.com/denoland/deno.git
synced 2024-10-31 09:14:20 -04:00
e3eae662f3
This commit adds "Deno.core.setFormatExceptionCallback" which can be used to provide custom formatting for errors. It is useful in cases when user throws something that is non-Error (eg. a string, plain object, etc).
40 lines
1,006 B
Text
40 lines
1,006 B
Text
running 6 tests from [WILDCARD]/non_error_thrown.ts
|
|
foo ... FAILED ([WILDCARD])
|
|
bar ... FAILED ([WILDCARD])
|
|
baz ... FAILED ([WILDCARD])
|
|
qux ... FAILED ([WILDCARD])
|
|
quux ... FAILED ([WILDCARD])
|
|
quuz ... FAILED ([WILDCARD])
|
|
|
|
ERRORS
|
|
|
|
foo => [WILDCARD]/non_error_thrown.ts:1:6
|
|
error: undefined
|
|
|
|
bar => [WILDCARD]/non_error_thrown.ts:5:6
|
|
error: null
|
|
|
|
baz => [WILDCARD]/non_error_thrown.ts:9:6
|
|
error: 123
|
|
|
|
qux => [WILDCARD]/non_error_thrown.ts:13:6
|
|
error: "Hello, world!"
|
|
|
|
quux => [WILDCARD]/non_error_thrown.ts:17:6
|
|
error: [ 1, 2, 3 ]
|
|
|
|
quuz => [WILDCARD]/non_error_thrown.ts:21:6
|
|
error: { a: "Hello, world!", b: [ 1, 2, 3 ] }
|
|
|
|
FAILURES
|
|
|
|
foo => [WILDCARD]/non_error_thrown.ts:1:6
|
|
bar => [WILDCARD]/non_error_thrown.ts:5:6
|
|
baz => [WILDCARD]/non_error_thrown.ts:9:6
|
|
qux => [WILDCARD]/non_error_thrown.ts:13:6
|
|
quux => [WILDCARD]/non_error_thrown.ts:17:6
|
|
quuz => [WILDCARD]/non_error_thrown.ts:21:6
|
|
|
|
test result: FAILED. 0 passed; 6 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])
|
|
|
|
error: Test failed
|