From 33896276cfe826c18dcbfa0d626d7aeb85e55c12 Mon Sep 17 00:00:00 2001 From: LordNoteworthy Date: Wed, 3 Aug 2022 19:01:57 +0100 Subject: [PATCH] add some error logs --- file.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/file.go b/file.go index 364da97..c33fe09 100644 --- a/file.go +++ b/file.go @@ -166,7 +166,10 @@ func (pe *File) Parse() error { } // Parse the Rich header. - _ = pe.ParseRichHeader() + err = pe.ParseRichHeader() + if err != nil { + pe.logger.Errorf("rich header parsing failed: %v", err) + } // Parse the NT header. err = pe.ParseNTHeader() @@ -175,7 +178,10 @@ func (pe *File) Parse() error { } // Parse COFF symbol table. - _ = pe.ParseCOFFSymbolTable() + err = pe.ParseCOFFSymbolTable() + if err != nil { + pe.logger.Errorf("coff symbols parsing failed: %v", err) + } // Parse the Section Header. err = pe.ParseSectionHeader()