pub(crate) fn gen_type_error( cx: &mut JSContext, global: &GlobalScope, error: Error, ) -> RethrowError