未验证 提交 97e476af 编写于 作者: O openharmony_ci 提交者: Gitee

!11713 【轻量级 PR】:update zh-cn/application-dev/reference/apis/js-apis-zlib.md.

Merge pull request !11713 from longwei/N/A
......@@ -161,11 +161,11 @@ let options = {
try {
zlib.compressFile(inFile, outFile, options, (errData) => {
if (errData !== null) {
console.log(`errData is errCode:${errData.errCode} message:${errData.message}`);
console.log(`errData is errCode:${errData.code} message:${errData.message}`);
}
})
} catch(errData) {
console.log(`errData is errCode:${errData.errCode} message:${errData.message}`);
console.log(`errData is errCode:${errData.code} message:${errData.message}`);
}
```
......@@ -207,10 +207,10 @@ try {
zlib.compressFile(inFile, outFile, options).then((data) => {
console.info('compressFile success');
}).catch((errData) => {
console.log(`errData is errCode:${errData.errCode} message:${errData.message}`);
console.log(`errData is errCode:${errData.code} message:${errData.message}`);
})
} catch(errData) {
console.log(`errData is errCode:${errData.errCode} message:${errData.message}`);
console.log(`errData is errCode:${errData.code} message:${errData.message}`);
}
```
......@@ -258,11 +258,11 @@ let options = {
try {
zlib.decompressFile(inFile, outFile, options, (errData) => {
if (errData !== null) {
console.log(`errData is errCode:${errData.errCode} message:${errData.message}`);
console.log(`errData is errCode:${errData.code} message:${errData.message}`);
}
})
} catch(errData) {
console.log(`errData is errCode:${errData.errCode} message:${errData.message}`);
console.log(`errData is errCode:${errData.code} message:${errData.message}`);
}
```
......@@ -304,10 +304,10 @@ try {
zlib.decompressFile(inFile, outFile, options).then((data) => {
console.info('decompressFile success');
}).catch((errData) => {
console.log(`errData is errCode:${errData.errCode} message:${errData.message}`);
console.log(`errData is errCode:${errData.code} message:${errData.message}`);
})
} catch(errData) {
console.log(`errData is errCode:${errData.errCode} message:${errData.message}`);
console.log(`errData is errCode:${errData.code} message:${errData.message}`);
}
```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册