diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2023-04-27 22:36:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-27 23:36:49 +0200 |
commit | 504482dadd4d8cd9e4105d56ed86802906767f39 (patch) | |
tree | acacb80e50ccfae578822dda63a3ec9e61108d60 /core/ops_builtin_v8.rs | |
parent | 6cd62ea5e969de258b1d308daf5bec91e73e79d3 (diff) |
fix(repl): print unhandled rejections and event errors (#18878)
Fixes #8858.
Fixes #8869.
```
$ target/debug/deno
Deno 1.32.5
exit using ctrl+d, ctrl+c, or close()
REPL is running with all permissions allowed.
To specify permissions, run `deno repl` with allow flags.
> Promise.reject(new Error("bar"));
Promise { <rejected> Error: bar
at <anonymous>:2:16 }
Uncaught (in promise) Error: bar
at <anonymous>:2:16
> reportError(new Error("baz"));
undefined
Uncaught Error: baz
at <anonymous>:2:13
>
Diffstat (limited to 'core/ops_builtin_v8.rs')
-rw-r--r-- | core/ops_builtin_v8.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/core/ops_builtin_v8.rs b/core/ops_builtin_v8.rs index f4133f3b8..67cf1222f 100644 --- a/core/ops_builtin_v8.rs +++ b/core/ops_builtin_v8.rs @@ -715,8 +715,7 @@ fn op_dispatch_exception( let mut state = state_rc.borrow_mut(); if let Some(inspector) = &state.inspector { let inspector = inspector.borrow(); - // TODO(nayeemrmn): Send exception message to inspector sessions here. - + inspector.exception_thrown(scope, exception.v8_value, false); // This indicates that the op is being called from a REPL. Skip termination. if inspector.is_dispatching_message() { return; |