fix: 异常兜底路径经 create_from_text 恢复错误类型(不塌缩普通 Error)

This commit is contained in:
爱特每羊队
2026-08-10 20:19:51 +08:00
parent e8506e6f29
commit 717e927057
8 changed files with 65 additions and 59 deletions
+1 -1
View File
@@ -437,7 +437,7 @@ impl Vm {
let exc = self
.last_uncaught_value
.take()
.unwrap_or_else(|| oxide_builtins::error::create_error(self, err));
.unwrap_or_else(|| oxide_builtins::error::create_from_text(self, err));
let kind = self.thrown_error_kind(exc);
self.exception_value = Some(exc);
self.pending_error_kind = Some(kind);