init builtins

This commit is contained in:
2026-03-16 18:03:40 +08:00
parent 198d847151
commit 1950d4de6c
22 changed files with 2197 additions and 665 deletions
+2 -5
View File
@@ -125,8 +125,6 @@ pub enum Error {
#[label("error occurred here")]
span: Option<SourceSpan>,
message: String,
#[help]
js_backtrace: Option<String>,
#[related]
stack_trace: Vec<StackFrame>,
},
@@ -163,12 +161,11 @@ impl Error {
.into()
}
pub fn eval_error(msg: String, backtrace: Option<String>) -> Box<Self> {
pub fn eval_error(msg: impl Into<String>) -> Box<Self> {
Error::EvalError {
src: None,
span: None,
message: msg,
js_backtrace: backtrace,
message: msg.into(),
stack_trace: Vec::new(),
}
.into()