From e3eae662f3d753141571bd132ccb199f95c745ea Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Mon, 6 Jun 2022 19:26:57 +0100 Subject: 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). --- cli/tests/integration/test_tests.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'cli/tests/integration/test_tests.rs') diff --git a/cli/tests/integration/test_tests.rs b/cli/tests/integration/test_tests.rs index 3a7e71090..c63ee6e5a 100644 --- a/cli/tests/integration/test_tests.rs +++ b/cli/tests/integration/test_tests.rs @@ -387,3 +387,9 @@ itest!(check_local_by_default2 { http_server: true, exit_code: 1, }); + +itest!(non_error_thrown { + args: "test --quiet test/non_error_thrown.ts", + output: "test/non_error_thrown.out", + exit_code: 1, +}); -- cgit v1.2.3