Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: revert js_class_and_message_to_exception to just do TypeErrors #1037

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions core/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,17 +239,18 @@ pub fn throw_js_error_class(

fn js_class_and_message_to_exception<'s>(
scope: &mut v8::HandleScope<'s>,
class: &str,
_class: &str,
message: &str,
) -> v8::Local<'s, v8::Value> {
let message = v8::String::new(scope, message).unwrap();
match class {
/*match class {
TYPE_ERROR => v8::Exception::type_error(scope, message),
RANGE_ERROR => v8::Exception::range_error(scope, message),
REFERENCE_ERROR => v8::Exception::reference_error(scope, message),
SYNTAX_ERROR => v8::Exception::syntax_error(scope, message),
_ => v8::Exception::error(scope, message),
}
}*/
v8::Exception::type_error(scope, message)
}

pub fn to_v8_error<'a>(
Expand Down
Loading