통신 또는 API의 처리중 에러 발생시 이벤트
Parameters | Type | Description |
---|---|---|
nErrorCode | short | 에러 코드 |
strErrorMsg | STRING | 에러 메시지 |
strRemoteIP | STRING | 데이터를 송신한 IP 주소(수신에 실패한 경우는 빈값) |
nRemotePort | short | 데이터를 송신한 UDP 포트 번호(수신에 실패한 경우는 0) |
Type | Description |
---|---|
void |
function tcpclt01_on_error(objInst, nErrorCode, strErrorMsg, strRemoteIP, nRemotePort)
{
// 에러 발생
if (strRemoteIP != "") {
// 송신 실패
screen.alert(objInst.getname() + "_on_error : " + nErrorCode + ", " + strErrorMsg + ", " + strRemoteIP + ", " + nRemotePort);
} else {
// 그 외의 오류(수신 실패, API처리 실패)
screen.alert(objInst.getname() + "_on_error : " + nErrorCode + ", " + strErrorMsg);
}
}