diff options
author | Cre3per <12541974+Cre3per@users.noreply.github.com> | 2022-10-16 21:16:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-16 21:16:46 +0200 |
commit | cf1be5e76fc8d62357f1f4a51e610bd4f07a7927 (patch) | |
tree | 5b200fc717787bea2eeee27d0459d563220b55fa /core/error.rs | |
parent | 5252ff5dbd1e2adc9e38407be7ea50549612c543 (diff) |
fix: add error cause in recursive cause tail (#16306)
Diffstat (limited to 'core/error.rs')
-rw-r--r-- | core/error.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/error.rs b/core/error.rs index 7af6ad375..626f9b6f2 100644 --- a/core/error.rs +++ b/core/error.rs @@ -209,7 +209,7 @@ impl JsError { fn inner_from_v8_exception<'a>( scope: &'a mut v8::HandleScope, exception: v8::Local<'a, v8::Value>, - mut seen: HashSet<v8::Local<'a, v8::Value>>, + mut seen: HashSet<v8::Local<'a, v8::Object>>, ) -> Self { // Create a new HandleScope because we're creating a lot of new local // handles below. @@ -254,10 +254,10 @@ impl JsError { } }); let cause = cause.and_then(|cause| { - if cause.is_undefined() || seen.contains(&cause) { + if cause.is_undefined() || seen.contains(&exception) { None } else { - seen.insert(cause); + seen.insert(exception); Some(Box::new(JsError::inner_from_v8_exception( scope, cause, seen, ))) |