fix: resolve ByRef parameter type mismatch in error logger calls
All checks were successful
NTFY Notification / notify (push) Successful in 4s
All checks were successful
NTFY Notification / notify (push) Successful in 4s
Convert Long rowIdx parameters to String using CStr() for clsErrorLogger.Record/RecordWarning methods. Changes: - M03_Logic.bas: Add CStr() to 5 logger calls (lines 37, 112, 200, 208, 215) - M03_Logic.bas: Change ParseAtom syntax error from Record to RecordWarning (non-blocking) - M05_PreProcessor.bas: Add CStr() to mapping warning (line 318) This resolves VBA compilation errors caused by passing Long type to ByRef String parameters. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -34,7 +34,7 @@ Public Function ParseRule(strRule As String, rowIdx As Long) As Collection
|
||||
Exit Function
|
||||
|
||||
ErrorHandler:
|
||||
g_Logger.Record rowIdx, "M03.ParseRule", "System Error", err.Description, strRule
|
||||
g_Logger.Record CStr(rowIdx), "M03.ParseRule", "System Error", err.Description, strRule
|
||||
Set ParseRule = Nothing
|
||||
End Function
|
||||
|
||||
@@ -109,7 +109,7 @@ Private Function ParseAtom(strAtom As String, rowIdx As Long) As Collection
|
||||
Else
|
||||
' 无法解析的格式
|
||||
If Len(strAtom) > 0 Then
|
||||
g_Logger.Record rowIdx, "M03.ParseAtom", "Syntax Error", "No = or != found", strAtom
|
||||
g_Logger.RecordWarning CStr(rowIdx), "M03.ParseAtom", "Syntax Error", "No = or != found", strAtom
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -197,7 +197,7 @@ Private Function MergeDictionaries(d1 As Object, d2 As Object, rowIdx As Long) A
|
||||
ElseIf Left(v1, 2) = "!=" And Left(v2, 2) <> "!=" Then
|
||||
' v1!=, v2=
|
||||
If v2 = Mid(v1, 3) Then
|
||||
g_Logger.Record rowIdx, "M03.Conflict", "Logic Conflict", "Equals disallowed value", k & ": " & v1 & " AND " & v2
|
||||
g_Logger.Record CStr(rowIdx), "M03.Conflict", "Logic Conflict", "Equals disallowed value", k & ": " & v1 & " AND " & v2
|
||||
Set MergeDictionaries = Nothing: Exit Function
|
||||
Else
|
||||
res(k) = v2
|
||||
@@ -205,14 +205,14 @@ Private Function MergeDictionaries(d1 As Object, d2 As Object, rowIdx As Long) A
|
||||
ElseIf Left(v1, 2) <> "!=" And Left(v2, 2) = "!=" Then
|
||||
' v1=, v2!=
|
||||
If v1 = Mid(v2, 3) Then
|
||||
g_Logger.Record rowIdx, "M03.Conflict", "Logic Conflict", "Equals disallowed value", k & ": " & v1 & " AND " & v2
|
||||
g_Logger.Record CStr(rowIdx), "M03.Conflict", "Logic Conflict", "Equals disallowed value", k & ": " & v1 & " AND " & v2
|
||||
Set MergeDictionaries = Nothing: Exit Function
|
||||
Else
|
||||
res(k) = v1
|
||||
End If
|
||||
Else
|
||||
' 都是等于,但值不同
|
||||
g_Logger.Record rowIdx, "M03.Conflict", "Logic Conflict", "Mutually Exclusive", k & "=" & v1 & " AND " & v2
|
||||
g_Logger.Record CStr(rowIdx), "M03.Conflict", "Logic Conflict", "Mutually Exclusive", k & "=" & v1 & " AND " & v2
|
||||
Set MergeDictionaries = Nothing: Exit Function
|
||||
End If
|
||||
Else
|
||||
|
||||
@@ -315,7 +315,7 @@ Private Function ApplyRegexMapping( _
|
||||
result = exactRegex.Replace(result, replacementStr)
|
||||
Else
|
||||
' 记录警告
|
||||
g_Logger.Record rowIdx, "M05.PreProcessor", "Mapping Warning", _
|
||||
g_Logger.RecordWarning CStr(rowIdx), "M05.PreProcessor", "Mapping Warning", _
|
||||
"Value not found in mapping table: " & keyName & "=" & originalValue, match.Value
|
||||
End If
|
||||
Next i
|
||||
|
||||
Reference in New Issue
Block a user