未验证 提交 35d41ee5 编写于 作者: L longwei 提交者: Gitee

update zh-cn/application-dev/reference/apis/js-apis-zlib.md.

Signed-off-by: Nlongwei <longwei27@huawei.com>
上级 b92fe568
......@@ -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.
先完成此消息的编辑!
想要评论请 注册