@@ -5,14 +5,18 @@ import (
55 "fmt"
66
77 "github.com/github/gh-aw/pkg/console"
8+ "github.com/github/gh-aw/pkg/logger"
89)
910
11+ var compilerErrorLog = logger .New ("workflow:compiler_error_formatter" )
12+
1013// formatCompilerError creates a formatted compiler error message with optional error wrapping
1114// filePath: the file path to include in the error (typically markdownPath or lockFile)
1215// errType: the error type ("error" or "warning")
1316// message: the error message text
1417// cause: optional underlying error to wrap (use nil for validation errors)
1518func formatCompilerError (filePath string , errType string , message string , cause error ) error {
19+ compilerErrorLog .Printf ("Formatting compiler error: file=%s, type=%s, message=%s" , filePath , errType , message )
1620 formattedErr := console .FormatError (console.CompilerError {
1721 Position : console.ErrorPosition {
1822 File : filePath ,
@@ -40,6 +44,7 @@ func formatCompilerError(filePath string, errType string, message string, cause
4044// message: the error message text
4145// cause: optional underlying error to wrap (use nil for validation errors)
4246func formatCompilerErrorWithPosition (filePath string , line int , column int , errType string , message string , cause error ) error {
47+ compilerErrorLog .Printf ("Formatting compiler error: file=%s, line=%d, column=%d, type=%s, message=%s" , filePath , line , column , errType , message )
4348 formattedErr := console .FormatError (console.CompilerError {
4449 Position : console.ErrorPosition {
4550 File : filePath ,
0 commit comments