fix: handle exception when ShotSearch returns timeout message

Problem:
- Unhandled exception occurs during ShotSearch execution.
- Error message: "Conversion from string 'The operation has timed out.'
  to type 'Double' is not valid."

Reproduction:
- Occurs when the communication port is disconnected during the
  "Information Input" state.

Cause:
- ShotSearch returns a timeout message as a string.
- Comparing this string directly to an integer (e.g., If ShotSearch() = 0)
  causes a runtime type conversion exception.

Fix:
- Updated condition from:
    If ShotSearch() = 0 Then
  to:
    If ShotSearch() = "False" Then
- Prevents runtime error by avoiding invalid comparison between string and integer.
This commit is contained in:
jiwonRepair 2025-07-24 11:20:46 +09:00
parent d44e15e03b
commit a724e836d8
2 changed files with 14 additions and 4 deletions

View File

@ -559,7 +559,7 @@ Public Class MainForm
Private Sub FormSetting()
Const ProgramName As String = "Product Program Ver_"
Const VersionNum As String = "1.1.5"
Const VersionNum As String = "1.1.6"
Me.Text = ProgramName & VersionNum
Me.Size = New Size(1920, 1050)
@ -1259,7 +1259,7 @@ FinishFunc:
If ProdRegData(txbPDCP.Text, txbPDCC.Text, txbPDAgency.Text) Then
If ShotReg(0) Then
If ShotSearch() = 0 Then
If ShotSearch() = "False" Then 'If ShotSearch() = 0 Then
If DBProdReg(txbPDCP.Text, txbPDCC.Text, txbPDAgency.Text, 0) Then
If TraySuccess() Then
@ -1282,6 +1282,7 @@ FinishFunc:
End If
Else
MsgBox("샷 수 정보 확인 실패 !", vbCritical)
MsgBox("통신 포트 연결을 확인하세요", vbCritical)
GoTo LoadFail
End If
Else

View File

@ -1,2 +1,11 @@
1. 시리얼번호 생성 오류 메세지 수정
2. EFFECT V3 color list 수정(라인프렌즈 외 제거)
1. "작업 시간을 초과화였습니다." 에러 수정
1) 재현경로:
- "정보 입력중" 상태에서 통신 포트 연결이 끊어질 경우
2) 에러 발생 사유:
- 문자열을 경우 정수 값과 비교 하면 처리 되지 않은 예외 발생
3) 수정 내용:
- If ShotSearch() = 0 Then -> If ShotSearch() = "False"
2. program version 1.1.6