init builtins
This commit is contained in:
+2
-5
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user