未验证 提交 562f25c1 编写于 作者: O openharmony_ci 提交者: Gitee

!4074 【OpenHarmony开源贡献者计划2022】API相关格式及表达问题-2

Merge pull request !4074 from king_he/api-b
......@@ -11,7 +11,7 @@ Implements the extension context. This module is inherited from **Context**.
**System capability**: SystemCapability.Ability.AbilityRuntime.Core
| Name| Type| Readable| Writable| Description|
| Name | Type | Readable | Writable | Description |
| -------- | -------- | -------- | -------- | -------- |
| currentHapModuleInfo | HapModuleInfo | Yes| No| Information about the current HAP. |
| config | Configuration | Yes| No| Module configuration information.|
| currentHapModuleInfo | HapModuleInfo | Yes| No | Information about the current HAP. |
| config | Configuration | Yes| No | Module configuration information. |
......@@ -15,12 +15,12 @@ Enumerates the fault types.
**System capability**: SystemCapability.HiviewDFX.Hiview.FaultLogger
| Name| Default Value| Description|
| Name | Default Value | Description |
| -------- | -------- | -------- |
| NO_SPECIFIC | 0 | No specific fault type.|
| CPP_CRASH | 2 | C++ program crash.|
| JS_CRASH | 3 | JS program crash.|
| APP_FREEZE | 4 | Application freezing.|
| NO_SPECIFIC | 0 | No specific fault type. |
| CPP_CRASH | 2 | C++ program crash. |
| JS_CRASH | 3 | JS program crash. |
| APP_FREEZE | 4 | Application freezing. |
## FaultLogInfo
......@@ -30,20 +30,20 @@ Defines the data structure of the fault log information.
| Name| Type| Description|
| -------- | -------- | -------- |
| pid | number | Process ID of the faulty process.|
| uid | number | User ID of the faulty process.|
| type | [FaultType](#faulttype) | Fault type.|
| timestamp | number | Second-level timestamp when the log was generated.|
| reason | string | Reason for the fault.|
| module | string | Module on which the fault occurred.|
| summary | string | Summary of the fault.|
| fullLog | string | Full log text.|
| pid | number | Process ID of the faulty process. |
| uid | number | User ID of the faulty process. |
| type | [FaultType](#faulttype) | Fault type. |
| timestamp | number | Second-level timestamp when the log was generated. |
| reason | string | Reason for the fault. |
| module | string | Module on which the fault occurred. |
| summary | string | Summary of the fault. |
| fullLog | string | Full log text. |
## faultLogger.querySelfFaultLog
querySelfFaultLog(faultType: FaultType, callback: AsyncCallback<Array<FaultLogInfo>>) : void
Obtains the fault information about the current process. This API uses a callback to return the fault information array obtained, which contains a maximum of 10 pieces of fault information.
Obtains the fault information about the current process. This API uses an asynchronous callback to return the fault information array obtained, which contains a maximum of 10 pieces of fault information.
**System capability**: SystemCapability.HiviewDFX.Hiview.FaultLogger
......@@ -51,7 +51,7 @@ Obtains the fault information about the current process. This API uses a callbac
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| faultType | [FaultType](#faulttype) | Yes| Fault type.|
| faultType | [FaultType](#faulttype) | Yes| Fault type. |
| callback | AsyncCallbackArray&lt;Array&lt;[FaultLogInfo](#faultloginfo)&gt;&gt; | Yes| Callback used to return the fault information array.<br>The value is the fault information array obtained. If the value is **undefined**, an exception occurs during the information retrieval. In this case, an error string will be returned.
**Example**
......@@ -91,13 +91,13 @@ Obtains the fault information about the current process. This API uses a promise
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| faultType | [FaultType](#faulttype) | Yes| Fault type.|
| faultType | [FaultType](#faulttype) | Yes| Fault type. |
**Return value**
| Type| Description|
| -------- | -------- |
| Promise&lt;Array&lt;[FaultLogInfo](#faultloginfo)&gt;&gt; | Promise used to return the fault information array. You can obtain the fault information instance in its **then()** method or use **await**.<br>The value is the fault information array obtained. If the value is **undefined**, an exception occurs during the information retrieval.|
| Promise&lt;Array&lt;[FaultLogInfo](#faultloginfo)&gt;&gt; | Promise used to return the fault information array. You can obtain the fault information instance in its **then()** method or use **await**.<br>The value is the fault information array obtained. If the value is **undefined**, an exception occurs during the information retrieval. |
**Example**
......@@ -120,4 +120,4 @@ async function getLog() {
}
}
}
```
```
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册