mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-23 18:21:13 +08:00
fix: 修复 throw_err 宏未支持 SyntaxError 问题
This commit is contained in:
@@ -65,6 +65,15 @@ macro_rules! throw_err {
|
||||
Err(e) => return Err(e),
|
||||
}
|
||||
}};
|
||||
($self:ident, SyntaxError, $msg:expr) => {{
|
||||
let error = crate::builtins::error::create_syntax_error($self, $msg);
|
||||
$self.exception_value = Some(error);
|
||||
$self.pending_error_kind = Some("SyntaxError");
|
||||
match $self.unwind() {
|
||||
Ok(()) => continue,
|
||||
Err(e) => return Err(e),
|
||||
}
|
||||
}};
|
||||
}
|
||||
|
||||
pub struct CallFrame {
|
||||
|
||||
Reference in New Issue
Block a user