HarmonyOS BusinessError: An exception occurred during serialization, taskpool: failed to serialize arguments.
使用taskpool执行异步函数时,报函数参数无法序列号错误
@Sendable
export default class InsertDbDataBean{
no: string =''
name: string=''
...
}
export class CompareResult {
delList: Set<string> = new Set();
addList: Array<InsertDbDataBean> = new Array();
}
@Concurrent
export function dataCompareUtils(appDbList:InsertDbDataBean[],serverMap:Map<string,InsertDbDataBean>,localContactIds:Set<string>): CompareResult {
let jobNoDel: Set<string> = new Set();
let dbNoAdd:Array<InsertDbDataBean> = new Array();
....
return {
delList: jobNoDel,
addList: dbNoAdd
}
}
HarmonyOS
赞
收藏 0
回答 1
待解决
相关问题
BusinessError类型中,如果类似reject("12345")调用,该怎么在BusinessError中取到"12345"数据
1536浏览 • 1回复 待解决
A problem occurred configuring project ':entry'. > An error occur in configuration.
6151浏览 • 1回复 待解决
HarmonyOS occur exception need return错误
23浏览 • 1回复 待解决
编译报错Found exception如下
1487浏览 • 1回复 待解决
CompileScript失败,报错JSVM_PENDING_EXCEPTION
20浏览 • 1回复 待解决
HarmonyOS 如何使用BusinessError设置code码并抛出异常?
317浏览 • 1回复 待解决
A problem occurred configuring project ':entry'. > Unable to download the HarmonyOS SDK. proxyHost s
12041浏览 • 2回复 待解决
HarmonyOS 系统库中含有std::exception类型信息导致catch异常
42浏览 • 1回复 待解决
polardb添加索引报错Fail to get MDL on replica during DDL怎么回事?
4815浏览 • 1回复 待解决
error: install failed due to grant request permissions failed.
4419浏览 • 1回复 待解决
获取设备列表FeatureAbility.getDeviceList报process request runtime exception
5523浏览 • 1回复 待解决
HarmonyOS taskpool怎么使用
44浏览 • 1回复 待解决
SystemPluginLoader: find plugin class exception, Class:ohos.event.notification.plugin.NotificationPl
5931浏览 • 1回复 待解决
HarmonyOS taskpool使用crash
1452浏览 • 2回复 待解决
HarmonyOS taskpool Sendable对象
21浏览 • 1回复 待解决
HarmonyOS TaskPool相关咨询
40浏览 • 1回复 待解决
#鸿蒙通关秘籍#处理occur exception need return日志提示的方案有哪些?
74浏览 • 1回复 待解决
HarmonyOS 安装hap的时候code:9568289 error: install failed due to grant request permissions failed
661浏览 • 1回复 待解决
安装HAP时提示“code:9568289 error: install failed due to grant request permissions failed”
2282浏览 • 1回复 待解决
HarmonyOS taskpool使用问题咨询
232浏览 • 1回复 待解决
HarmonyOS Promise & taskpool使用问题
328浏览 • 1回复 待解决
请检查序列化对象是否支持,文档说明如下:
序列化支持的类型包括:除Symbol之外的基础类型、Date、String、RegExp、Array、Map、Set、Object(仅限简单对象,比如通过“{}”或者“new Object”创建,普通对象仅支持传递属性,不支持传递其原型及方法)、ArrayBuffer、TypedArray。
文档:https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/serialization-support-types-V5