diff options
| author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2022-06-06 19:26:57 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-06 20:26:57 +0200 |
| commit | e3eae662f3d753141571bd132ccb199f95c745ea (patch) | |
| tree | e0cdad78f409c9b221b909d0d7dfcee286e6325f /cli/tests/testdata/test/non_error_thrown.out | |
| parent | 1081659be176a59512a7e9e3dc93e13046a26aec (diff) | |
fix: Format non-error exceptions (#14604)
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).
Diffstat (limited to 'cli/tests/testdata/test/non_error_thrown.out')
| -rw-r--r-- | cli/tests/testdata/test/non_error_thrown.out | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/cli/tests/testdata/test/non_error_thrown.out b/cli/tests/testdata/test/non_error_thrown.out new file mode 100644 index 000000000..922129e29 --- /dev/null +++ b/cli/tests/testdata/test/non_error_thrown.out @@ -0,0 +1,40 @@ +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 |
