Skip to content

Commit 2d8aa23

Browse files
committed
throw TypeError
1 parent 5003b48 commit 2d8aa23

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/act_patch.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ pub fn gen_param_type_check_patch(
4747
r#"console.warn({}," and was casted"); {}({});"#,
4848
log_message, param_js_constructor, param.name
4949
),
50-
PatchType::Error => format!(r#"throw {};"#, log_message),
50+
PatchType::Error => format!(r#"throw new TypeError({});"#, log_message),
5151
PatchType::Warning => format!(r#"console.warn({});"#, log_message),
5252
};
5353
let typeinfo_operator = get_typeinfo_operator_from_acttype(&param.act_type);

0 commit comments

Comments
 (0)