diff --git a/VBA_BOMConverter/Modules/M03_Logic.bas b/VBA_BOMConverter/Modules/M03_Logic.bas index 90b1599..f7962e1 100644 --- a/VBA_BOMConverter/Modules/M03_Logic.bas +++ b/VBA_BOMConverter/Modules/M03_Logic.bas @@ -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 diff --git a/VBA_BOMConverter/Modules/M05_PreProcessor.bas b/VBA_BOMConverter/Modules/M05_PreProcessor.bas index 17e3db8..96d63a2 100644 --- a/VBA_BOMConverter/Modules/M05_PreProcessor.bas +++ b/VBA_BOMConverter/Modules/M05_PreProcessor.bas @@ -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