Scroll History Alerts¶
Search for the past 3 months’ historical alerts. The first search returns a pageToken to be used for the next search, and all subsequent searches will return a different pageToken to be used for its next search.
Request Format¶
POST https://{apigw-address}/event-service/v2.1/history-alerts?action=scroll
Request Parameters (URI)¶
Name |
Location (Path/Query) |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|---|
orgId |
Query |
Mandatory |
String |
The organization ID which the asset belongs to. How to get orgId>> |
Request Parameters (Body)¶
Name |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|
modelId |
Optional |
String |
The model ID. How to get modelID>> |
assetId |
Optional |
String |
The asset ID. How to get assetId>> |
measurepointsId |
Optional |
String |
The measurement point ID. How to get pointId>> |
startOccurTime |
Mandatory |
String |
The start time for triggering alert. To be used with |
endOccurTime |
Mandatory |
String |
The end time for triggering alert. To be used with |
recoverStartTime |
Optional |
String |
The start time of the alert recovery. To be used with |
recoverEndTime |
Optional |
String |
The end time of the alert recovery. To be used with |
expression |
Optional |
String |
The query expression, which supports sql-like query. The supported logical operators are “and” and “or”, and query fields are as per the below.
|
scope |
Optional |
Scope Struct |
Query the alerts in a specified asset tree or in an asset node on the asset tree, and specify whether to return the blocked derivative alerts. This parameter cannot be applied with rootAlert. For more details, see Scope Struct>> |
rootAlert |
Optional |
RootAlert Struct |
Query the derivative alerts which are blocked by the specified root alert. This parameter cannot be applied with scope. For more details, see RootAlert Struct>> |
scroll |
Mandatory |
Scroll Struct |
The parameters used for the search. Results can only be sorted based on |
Scroll Struct ¶
Name |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|
pageSize |
|
Integer |
The number of records in each page, which must be greater than 0. |
pageToken |
|
String |
The token for the next page. |
Response Parameters¶
Name |
Data Type |
Description |
---|---|---|
data |
Array of HistoryAlert Structs |
A list of the history alerts returned. For details of a historyAlert struct, see HistoryAlert Struct>> |
sortedBy |
Sorter Struct |
The sorting method. For more information, see Sorter Struct>> |
pageToken |
String |
The token for the next page. |
pageSize |
Integer |
The number of records in each page. |
Samples¶
Request Sample¶
url: https://{apigw-address}/event-service/v2.1/history-alerts?action=scroll&orgId=yourOrgId
method: POST
requestBody:
{
"endOccurTime":"2020-11-15T00:00:00Z",
"startOccurTime":"2020-09-10T00:00:00Z",
"scroll":{
"pageSize":5
}
}
Return Sample¶
{
"code":0,
"msg":"OK",
"requestId":"7b062dce-1c75-45d8-94f8-943d3ae57d80",
"data":{
"items":[
{
"eventId":"20201114544f397a1ed4e5d4e307b30596a73349",
"orgId":"o15475450989191",
"assetId":"device-8999",
"modelId":"modelId-99",
"modelIdPath":"/modelId-99",
"measurepointId":"device-8999:point-9",
"deviceStatus":null,
"hitRuleId":"ruleId-8999",
"value":"8999.0",
"occurTime":1605360260827,
"localOccurTime":"2020-12-17 23:48:55",
"createTime":1608248937673,
"updateTime":1608248937673,
"severityId":"ruleId-8999:severity-9",
"severityDesc":{
"defaultValue":"default",
"i18nValue":{
"en_US":"english",
"zh_CN":"中文"
}
},
"typeId":"ruleId-8999:type-99",
"typeDesc":{
"defaultValue":"default1",
"i18nValue":{
"en_US":"english",
"zh_CN":"中文"
}
},
"subTypeId":null,
"subTypeDesc":null,
"contentId":"ruleId-8999:content-8999",
"contentDesc":{
"defaultValue":"default2",
"i18nValue":{
"en_US":"english",
"zh_CN":"中文"
}
},
"eventType":2,
"tag":{
"tag1":"vvvvvv",
"tag2":"vvvvvv",
"tag3":"vvvvvv"
},
"ruleDesc":{
"defaultValue":"default-8999",
"i18nValue":{
"en_US":"english8999",
"zh_CN":"中文-8999"
}
},
"assetPath":[
"tree-99:/device-8999"
],
"maskedBy":null,
"recoverTime":1608248935537,
"recoverLocalTime":"2019-11-18 00:00:00",
"recoverReason":"performance"
},
{
"eventId":"20201114a2633d52450a04835d390fdcb36ceb99",
"orgId":"o15475450989191",
"assetId":"device-8998",
"modelId":"modelId-98",
"modelIdPath":"/modelId-98",
"measurepointId":"device-8998:point-8",
"deviceStatus":null,
"hitRuleId":"ruleId-8998",
"value":"8998.0",
"occurTime":1605360260826,
"localOccurTime":"2020-12-17 23:48:55",
"createTime":1608248937673,
"updateTime":1608248937673,
"severityId":"ruleId-8998:severity-8",
"severityDesc":{
"defaultValue":"default",
"i18nValue":{
"en_US":"english",
"zh_CN":"中文"
}
},
"typeId":"ruleId-8998:type-98",
"typeDesc":{
"defaultValue":"default1",
"i18nValue":{
"en_US":"english",
"zh_CN":"中文"
}
},
"subTypeId":null,
"subTypeDesc":null,
"contentId":"ruleId-8998:content-8998",
"contentDesc":{
"defaultValue":"default2",
"i18nValue":{
"en_US":"english",
"zh_CN":"中文"
}
},
"eventType":2,
"tag":{
"tag1":"vvvvvv",
"tag2":"vvvvvv",
"tag3":"vvvvvv"
},
"ruleDesc":{
"defaultValue":"default-8998",
"i18nValue":{
"en_US":"english8998",
"zh_CN":"中文-8998"
}
},
"assetPath":[
"tree-98:/device-8998"
],
"maskedBy":null,
"recoverTime":1608248935537,
"recoverLocalTime":"2019-11-18 00:00:00",
"recoverReason":"performance"
},
{
"eventId":"2020111476be05332ebfce5b1b226ee8dcdfcbd4",
"orgId":"o15475450989191",
"assetId":"device-8997",
"modelId":"modelId-97",
"modelIdPath":"/modelId-97",
"measurepointId":"device-8997:point-7",
"deviceStatus":null,
"hitRuleId":"ruleId-8997",
"value":"8997.0",
"occurTime":1605360260825,
"localOccurTime":"2020-12-17 23:48:55",
"createTime":1608248937673,
"updateTime":1608248937673,
"severityId":"ruleId-8997:severity-7",
"severityDesc":{
"defaultValue":"default",
"i18nValue":{
"en_US":"english",
"zh_CN":"中文"
}
},
"typeId":"ruleId-8997:type-97",
"typeDesc":{
"defaultValue":"default1",
"i18nValue":{
"en_US":"english",
"zh_CN":"中文"
}
},
"subTypeId":null,
"subTypeDesc":null,
"contentId":"ruleId-8997:content-8997",
"contentDesc":{
"defaultValue":"default2",
"i18nValue":{
"en_US":"english",
"zh_CN":"中文"
}
},
"eventType":2,
"tag":{
"tag1":"vvvvvv",
"tag2":"vvvvvv",
"tag3":"vvvvvv"
},
"ruleDesc":{
"defaultValue":"default-8997",
"i18nValue":{
"en_US":"english8997",
"zh_CN":"中文-8997"
}
},
"assetPath":[
"tree-97:/device-8997"
],
"maskedBy":null,
"recoverTime":1608248935536,
"recoverLocalTime":"2019-11-18 00:00:00",
"recoverReason":"performance"
},
{
"eventId":"2020111488875dea7dc454a779cd7b474226525d",
"orgId":"o15475450989191",
"assetId":"device-8996",
"modelId":"modelId-96",
"modelIdPath":"/modelId-96",
"measurepointId":"device-8996:point-6",
"deviceStatus":null,
"hitRuleId":"ruleId-8996",
"value":"8996.0",
"occurTime":1605360260824,
"localOccurTime":"2020-12-17 23:48:55",
"createTime":1608248937673,
"updateTime":1608248937673,
"severityId":"ruleId-8996:severity-6",
"severityDesc":{
"defaultValue":"default",
"i18nValue":{
"en_US":"english",
"zh_CN":"中文"
}
},
"typeId":"ruleId-8996:type-96",
"typeDesc":{
"defaultValue":"default1",
"i18nValue":{
"en_US":"english",
"zh_CN":"中文"
}
},
"subTypeId":null,
"subTypeDesc":null,
"contentId":"ruleId-8996:content-8996",
"contentDesc":{
"defaultValue":"default2",
"i18nValue":{
"en_US":"english",
"zh_CN":"中文"
}
},
"eventType":2,
"tag":{
"tag1":"vvvvvv",
"tag2":"vvvvvv",
"tag3":"vvvvvv"
},
"ruleDesc":{
"defaultValue":"default-8996",
"i18nValue":{
"en_US":"english8996",
"zh_CN":"中文-8996"
}
},
"assetPath":[
"tree-96:/device-8996"
],
"maskedBy":null,
"recoverTime":1608248935536,
"recoverLocalTime":"2019-11-18 00:00:00",
"recoverReason":"performance"
},
{
"eventId":"2020111437c5603b2d76895a6625a59728bef325",
"orgId":"o15475450989191",
"assetId":"device-8995",
"modelId":"modelId-95",
"modelIdPath":"/modelId-95",
"measurepointId":"device-8995:point-5",
"deviceStatus":null,
"hitRuleId":"ruleId-8995",
"value":"8995.0",
"occurTime":1605360260823,
"localOccurTime":"2020-12-17 23:48:55",
"createTime":1608248937673,
"updateTime":1608248937673,
"severityId":"ruleId-8995:severity-5",
"severityDesc":{
"defaultValue":"default",
"i18nValue":{
"en_US":"english",
"zh_CN":"中文"
}
},
"typeId":"ruleId-8995:type-95",
"typeDesc":{
"defaultValue":"default1",
"i18nValue":{
"en_US":"english",
"zh_CN":"中文"
}
},
"subTypeId":null,
"subTypeDesc":null,
"contentId":"ruleId-8995:content-8995",
"contentDesc":{
"defaultValue":"default2",
"i18nValue":{
"en_US":"english",
"zh_CN":"中文"
}
},
"eventType":2,
"tag":{
"tag1":"vvvvvv",
"tag2":"vvvvvv",
"tag3":"vvvvvv"
},
"ruleDesc":{
"defaultValue":"default-8995",
"i18nValue":{
"en_US":"english8995",
"zh_CN":"中文-8995"
}
},
"assetPath":[
"tree-95:/device-8995"
],
"maskedBy":null,
"recoverTime":1608248935536,
"recoverLocalTime":"2019-11-18 00:00:00",
"recoverReason":"performance"
}
],
"sortedBy":[
{
"field":"occurTime",
"order":"DESC"
},
{
"field":"eventId",
"order":"DESC"
}
],
"pageToken":"DnF1ZXJ5VGhlbkZldGNoJQAAAAAD-2cPFjdwdXpUdWdsVEktTW9TUFZfbl9nZXcAAAAAA-s7PRZ6cThReE4weFRwRzhwZ293Y21oNzB3AAAAAAPrOz4WenE4UXhOMHhUcEc4cGdvd2NtaDcwdwAAAAAD-2cSFjdwdXpUdWdsVEktTW9TUFZfbl9nZXcAAAAAA-s7QBZ6cThReE4weFRwRzhwZ293Y21oNzB3AAAAAAP7ZxEWN3B1elR1Z2xUSS1Nb1NQVl9uX2dldwAAAAAD-2cTFjdwdXpUdWdsVEktTW9TUFZfbl9nZXcAAAAAA_tnEBY3cHV6VHVnbFRJLU1vU1BWX25fZ2V3AAAAAAOfARcWRXgtb0pOcktRUTJqQkRBUHl5UGVVUQAAAAAD-2cXFjdwdXpUdWdsVEktTW9TUFZfbl9nZXcAAAAAA-s7PxZ6cThReE4weFRwRzhwZ293Y21oNzB3AAAAAAP7ZxQWN3B1elR1Z2xUSS1Nb1NQVl9uX2dldwAAAAADnwEYFkV4LW9KTnJLUVEyakJEQVB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wAAAAAD6ztGFnpxOFF4TjB4VHBHOHBnb3djbWg3MHcAAAAAA-s7RRZ6cThReE4weFRwRzhwZ293Y21oNzB3AAAAAAP7ZxkWN3B1elR1Z2xUSS1Nb1NQVl9uX2dldwAAAAADnwEdFkV4LW9KTnJLUVEyakJEQVB5eVBlVVEAAAAAA_tnGhY3cHV6VHVnbFRJLU1vU1BWX25fZ2V3AAAAAAOfAR4WRXgtb0pOcktRUTJqQkRBUHl5UGVVUQAAAAADnwEfFkV4LW9KTnJLUVEyakJEQVB5eVBlVVEAAAAAA-s7RxZ6cThReE4weFRwRzhwZ293Y21oNzB3AAAAAAPrO0gWenE4UXhOMHhUcEc4cGdvd2NtaDcwdwAAAAAD-2ccFjdwdXpUdWdsVEktTW9TUFZfbl9nZXcAAAAAA-s7SRZ6cThReE4weFRwRzhwZ293Y21oNzB3AAAAAAOfASAWRXgtb0pOcktRUTJqQkRBUHl5UGVVUQAAAAADnwEhFkV4LW9KTnJLUVEyakJEQVB5eVBlVVE="
}
}
Next Page Return Sample¶
{
"code":0,
"msg":"OK",
"requestId":"d66c8f5b-5df2-42af-a644-1580aeff1a7c",
"data":{
"items":[
{
"eventId":"202011143ce0d9337de8af73f9ceb69bd6429597",
"orgId":"o15475450989191",
"assetId":"device-8994",
"modelId":"modelId-94",
"modelIdPath":"/modelId-94",
"measurepointId":"device-8994:point-4",
"deviceStatus":null,
"hitRuleId":"ruleId-8994",
"value":"8994.0",
"occurTime":1605360260822,
"localOccurTime":"2020-12-17 23:48:55",
"createTime":1608248937673,
"updateTime":1608248937673,
"severityId":"ruleId-8994:severity-4",
"severityDesc":{
"defaultValue":"default",
"i18nValue":{
"en_US":"english",
"zh_CN":"中文"
}
},
"typeId":"ruleId-8994:type-94",
"typeDesc":{
"defaultValue":"default1",
"i18nValue":{
"en_US":"english",
"zh_CN":"中文"
}
},
"subTypeId":null,
"subTypeDesc":null,
"contentId":"ruleId-8994:content-8994",
"contentDesc":{
"defaultValue":"default2",
"i18nValue":{
"en_US":"english",
"zh_CN":"中文"
}
},
"eventType":2,
"tag":{
"tag1":"vvvvvv",
"tag2":"vvvvvv",
"tag3":"vvvvvv"
},
"ruleDesc":{
"defaultValue":"default-8994",
"i18nValue":{
"en_US":"english8994",
"zh_CN":"中文-8994"
}
},
"assetPath":[
"tree-94:/device-8994"
],
"maskedBy":null,
"recoverTime":1608248935536,
"recoverLocalTime":"2019-11-18 00:00:00",
"recoverReason":"performance"
},
{
"eventId":"202011140785be50c976cd9e9b9dcb4b3654b1ac",
"orgId":"o15475450989191",
"assetId":"device-8993",
"modelId":"modelId-93",
"modelIdPath":"/modelId-93",
"measurepointId":"device-8993:point-3",
"deviceStatus":null,
"hitRuleId":"ruleId-8993",
"value":"8993.0",
"occurTime":1605360260821,
"localOccurTime":"2020-12-17 23:48:55",
"createTime":1608248937673,
"updateTime":1608248937673,
"severityId":"ruleId-8993:severity-3",
"severityDesc":{
"defaultValue":"default",
"i18nValue":{
"en_US":"english",
"zh_CN":"中文"
}
},
"typeId":"ruleId-8993:type-93",
"typeDesc":{
"defaultValue":"default1",
"i18nValue":{
"en_US":"english",
"zh_CN":"中文"
}
},
"subTypeId":null,
"subTypeDesc":null,
"contentId":"ruleId-8993:content-8993",
"contentDesc":{
"defaultValue":"default2",
"i18nValue":{
"en_US":"english",
"zh_CN":"中文"
}
},
"eventType":2,
"tag":{
"tag1":"vvvvvv",
"tag2":"vvvvvv",
"tag3":"vvvvvv"
},
"ruleDesc":{
"defaultValue":"default-8993",
"i18nValue":{
"en_US":"english8993",
"zh_CN":"中文-8993"
}
},
"assetPath":[
"tree-93:/device-8993"
],
"maskedBy":null,
"recoverTime":1608248935536,
"recoverLocalTime":"2019-11-18 00:00:00",
"recoverReason":"performance"
},
{
"eventId":"202011140593158501cb599efb5c146542260e5a",
"orgId":"o15475450989191",
"assetId":"device-8992",
"modelId":"modelId-92",
"modelIdPath":"/modelId-92",
"measurepointId":"device-8992:point-2",
"deviceStatus":null,
"hitRuleId":"ruleId-8992",
"value":"8992.0",
"occurTime":1605360260820,
"localOccurTime":"2020-12-17 23:48:55",
"createTime":1608248937673,
"updateTime":1608248937673,
"severityId":"ruleId-8992:severity-2",
"severityDesc":{
"defaultValue":"default",
"i18nValue":{
"en_US":"english",
"zh_CN":"中文"
}
},
"typeId":"ruleId-8992:type-92",
"typeDesc":{
"defaultValue":"default1",
"i18nValue":{
"en_US":"english",
"zh_CN":"中文"
}
},
"subTypeId":null,
"subTypeDesc":null,
"contentId":"ruleId-8992:content-8992",
"contentDesc":{
"defaultValue":"default2",
"i18nValue":{
"en_US":"english",
"zh_CN":"中文"
}
},
"eventType":2,
"tag":{
"tag1":"vvvvvv",
"tag2":"vvvvvv",
"tag3":"vvvvvv"
},
"ruleDesc":{
"defaultValue":"default-8992",
"i18nValue":{
"en_US":"english8992",
"zh_CN":"中文-8992"
}
},
"assetPath":[
"tree-92:/device-8992"
],
"maskedBy":null,
"recoverTime":1608248935535,
"recoverLocalTime":"2019-11-18 00:00:00",
"recoverReason":"performance"
},
{
"eventId":"202011144cc687134bc23615d2e4f7c3b2f2d318",
"orgId":"o15475450989191",
"assetId":"device-8991",
"modelId":"modelId-91",
"modelIdPath":"/modelId-91",
"measurepointId":"device-8991:point-1",
"deviceStatus":null,
"hitRuleId":"ruleId-8991",
"value":"8991.0",
"occurTime":1605360260819,
"localOccurTime":"2020-12-17 23:48:55",
"createTime":1608248937673,
"updateTime":1608248937673,
"severityId":"ruleId-8991:severity-1",
"severityDesc":{
"defaultValue":"default",
"i18nValue":{
"en_US":"english",
"zh_CN":"中文"
}
},
"typeId":"ruleId-8991:type-91",
"typeDesc":{
"defaultValue":"default1",
"i18nValue":{
"en_US":"english",
"zh_CN":"中文"
}
},
"subTypeId":null,
"subTypeDesc":null,
"contentId":"ruleId-8991:content-8991",
"contentDesc":{
"defaultValue":"default2",
"i18nValue":{
"en_US":"english",
"zh_CN":"中文"
}
},
"eventType":2,
"tag":{
"tag1":"vvvvvv",
"tag2":"vvvvvv",
"tag3":"vvvvvv"
},
"ruleDesc":{
"defaultValue":"default-8991",
"i18nValue":{
"en_US":"english8991",
"zh_CN":"中文-8991"
}
},
"assetPath":[
"tree-91:/device-8991"
],
"maskedBy":null,
"recoverTime":1608248935535,
"recoverLocalTime":"2019-11-18 00:00:00",
"recoverReason":"performance"
},
{
"eventId":"202011146d6cb76f813081f87a403cbcec868248",
"orgId":"o15475450989191",
"assetId":"device-8990",
"modelId":"modelId-90",
"modelIdPath":"/modelId-90",
"measurepointId":"device-8990:point-0",
"deviceStatus":null,
"hitRuleId":"ruleId-8990",
"value":"8990.0",
"occurTime":1605360260818,
"localOccurTime":"2020-12-17 23:48:55",
"createTime":1608248937609,
"updateTime":1608248937609,
"severityId":"ruleId-8990:severity-0",
"severityDesc":{
"defaultValue":"default",
"i18nValue":{
"en_US":"english",
"zh_CN":"中文"
}
},
"typeId":"ruleId-8990:type-90",
"typeDesc":{
"defaultValue":"default1",
"i18nValue":{
"en_US":"english",
"zh_CN":"中文"
}
},
"subTypeId":null,
"subTypeDesc":null,
"contentId":"ruleId-8990:content-8990",
"contentDesc":{
"defaultValue":"default2",
"i18nValue":{
"en_US":"english",
"zh_CN":"中文"
}
},
"eventType":2,
"tag":{
"tag1":"vvvvvv",
"tag2":"vvvvvv",
"tag3":"vvvvvv"
},
"ruleDesc":{
"defaultValue":"default-8990",
"i18nValue":{
"en_US":"english8990",
"zh_CN":"中文-8990"
}
},
"assetPath":[
"tree-90:/device-8990"
],
"maskedBy":null,
"recoverTime":1608248935535,
"recoverLocalTime":"2019-11-18 00:00:00",
"recoverReason":"performance"
}
],
"sortedBy":[
{
"field":"occurTime",
"order":"DESC"
},
{
"field":"eventId",
"order":"DESC"
}
],
"pageToken":"YjW7ZHK8QFxczrEctFJoPNAAAAAF-2cPFjdwdXpUdWdsVEktTW9TUFZfbl9nZXcAAAAAA-s7PRZ6cThReE4weFRwRzhwZ293Y21oNzB3AAAAAAPrOz4WenE4UXhOMHhUcEc4cGdvd2NtaDcw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VnbFRJLU1vU1BWX25fZ2V3AAAAAAOfAR4WRXgtb0pOcktRUTJqQkRBUHl5UGVVUQAAAAADnwEfFkV4LW9KTnJLUVEyakJEQVB5eVBlVVEAAAAAA-s7RxZ6cThReE4weFRwRzhwZ293Y21oNzB3AAAAAAPrO0gWenE4UXhOMHhUcEc4cGdvd2NtaDcwdwAAAAAD-2ccFjdwdXpUdWdsVEktTW9TUFZfbl9nZXcAAAAAA-s7SRZ6cThReE4weFRwRzhwZ293Y21oNzB3AAAAAAOfASAWRXgtb0pOcktRUTJqQkRBUHl5UGVVUQAAAAADnhEnFkV9LW3KTnULUVEpekTERVD2eSDlYYW=",
"pageSize":5
}
}
Java SDK Sample¶
public void testSearchHistoryAlerts(){
ScrollHistoryAlertRequest request = new ScrollHistoryAlertRequest();
request.setOrgId(orgId);
request.setStartOccurTime("2020-09-10T00:00:00Z");
request.setEndOccurTime("2020-11-15T00:00:00Z");
Scroll scroll = new Scroll();
scroll.setPageSize(5);
request.setScroll(scroll);
try {
long t1 = System.currentTimeMillis();
ScrollHistoryAlertResponse response = Poseidon.config(PConfig.init().appKey(appKey).appSecret(appSecret).debug())
.url(url)
.getResponse(request, ScrollHistoryAlertResponse.class);
for (HistoryAlert datum : response.getData().getItems()) {
System.out.println(datum.getEventId() + " " + datum.getLocalOccurTime());
}
ScrollHistoryAlertRequest request1 = new ScrollHistoryAlertRequest();
request1.setOrgId(orgId);
scroll = new Scroll(5, response.getData().getPageToken(),null);
request1.setScroll(scroll);
try {
ScrollHistoryAlertResponse response1 = Poseidon.config(PConfig.init().appKey(appKey).appSecret(appSecret).debug())
.url(url)
.getResponse(request1, ScrollHistoryAlertResponse.class);
for (HistoryAlert datum : response1.getData().getItems()) {
System.out.println(datum.getEventId() + " " + datum.getLocalOccurTime());
}
}catch(Exception e){
System.out.print(e);
}
}catch(Exception e){
System.out.print(e);
}
}