提交 d5a3f6a7 编写于 作者: S shawn_he

update doc

Signed-off-by: Nshawn_he <shawn.he@huawei.com>
上级 8540c6b1
...@@ -1375,15 +1375,16 @@ For details about the error codes, see [Resource Manager Error Codes](../errorco ...@@ -1375,15 +1375,16 @@ For details about the error codes, see [Resource Manager Error Codes](../errorco
try { try {
this.context.resourceManager.getRawFd("test.xml", (error, value) => { this.context.resourceManager.getRawFd("test.xml", (error, value) => {
if (error != null) { if (error != null) {
console.log("error is " + error); console.log(`callback getRawFd failed error code: ${error.code}, message: ${error.message}.`);
} else { } else {
let fd = value.fd; let fd = value.fd;
let offset = value.offset; let offset = value.offset;
let length = value.length; let length = value.length;
} }
}).catch(error => {
console.log("getRawFd callback error is " + error);
}); });
} catch (error) {
console.error(`callback getRawFd failed, error code: ${error.code}, message: ${error.message}.`)
};
``` ```
### getRawFd<sup>9+</sup> ### getRawFd<sup>9+</sup>
...@@ -1421,10 +1422,10 @@ For details about the error codes, see [Resource Manager Error Codes](../errorco ...@@ -1421,10 +1422,10 @@ For details about the error codes, see [Resource Manager Error Codes](../errorco
let offset = value.offset; let offset = value.offset;
let length = value.length; let length = value.length;
}).catch(error => { }).catch(error => {
console.log("getRawFd promise error is " + error); console.log(`promise getRawFd error error code: ${error.code}, message: ${error.message}.`);
}); });
} catch (error) { } catch (error) {
console.log("getRawFd promise error is " + error); console.error(`promise getRawFd failed, error code: ${error.code}, message: ${error.message}.`);
}; };
``` ```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册