Skip to content

错误码对照表 ​

SinleUI 相关插件统一错误码与错误信息对照。各 API 失败时返回的 UniError.errCode 对应下表,errMsg 由各模块按表提供;也可通过 sinle-logger 的 getErrMsg(errCode) 查询。

errCodeerrMsg含义
0ok成功
1cancel撤销
3system permission denied系统权限未授予
1001title is empty轻提示文本为空(snu.showToast 未传入 text / title,sn-e-toast 插件返回)
1002show toast failed显示轻提示失败(HarmonyOS 原生 Toast 调用失败)
1300002No such file or directory找不到文件或目录
9010002not support on this platform此平台不支持该功能
9010005no returned data无返回数据
9010006cannot find object "uniCloud", please bind uniCloud first找不到 uniCloud 对象,请先绑定服务空间
9010007please bind URL first请先绑定 URL 地址
9010008fail to read file读取文件失败
9010009fail to upload file文件上传失败
9010010fail to choose file选择文件失败
9010011brothers or parent of sn-backtop must be sn-scroll, sn-longlist or sn-pageBacktop 组件同级或父级必须为 sn-scroll/sn-longlist/sn-page;历史保留:2.0 起 sn-backtop 不再产出该码
9010012v-model must be a length-2 number[]Slider Double 组件的 v-model 属性必须为长度为 2 的 number[];已废弃:2.0 的 sn-slider-double 改为静默兜底
9010013id of param feature's item cannot be "menu"Topbar 组件 feature 属性子项 id 不能为“menu”;已废弃:sn-topbar 的 feature 属性已改为 menuData
9010014param "digit" must be a positive integerdigits 参数必须为正整数
9010015this storeKey already exists, please try another oneStoreLib 实例的 storeKey 不得重复;已废弃:Store 状态管理库 2.0 已移除
9010016upload timeoutsn-upload-media 组件上传超时(超时后已中止上传任务)
9010051param "content" not provided未提供 content 参数;已废弃:2.0 起无模块产出
9010052param "path" not provided未提供 path 参数;已废弃:2.0 起无模块产出
9010053invalid param "path"path 参数提供的路径不合法;已废弃:2.0 起无模块产出
9010054failed to open dialogPage打开弹窗页失败;已废弃:已细分为 9010055 / 9010056 / 9010057
9010055failed to open modal dialogPage打开模态框弹窗页失败
9010056failed to open actionsheet dialogPage打开操作菜单弹窗页失败
9010057failed to open loading dialogPage打开加载弹窗页失败
9012001Worker 创建失败runSort(sn-sort 插件)的 Worker 子线程创建失败
9012002Worker 运行错误runSort(sn-sort 插件)的 Worker 子线程运行错误,错误详情以 : 追加在后
1602001camera permission denied相机权限未授予
1602002camera initialization failed相机初始化失败
1602003image scan failed图片识别失败
1602004invalid image uri图片路径不合法
1602005internal error内部错误

说明:标注历史保留的错误码在 2.0 源码中已无模块产出、仅为兼容 1.x 保留;标注已废弃的错误码对应的能力已在 2.0 移除。二者仍保留在 sinle-logger 的错误信息表中,getErrMsg(errCode) 可正常查询。

使用 MIT 协议