Fix lint errors related to not checking errors

This commit is contained in:
Eli Ribble 2026-05-02 00:37:28 +00:00
parent 7f71ff9a2e
commit 52d4c47e43
No known key found for this signature in database
7 changed files with 54 additions and 10 deletions

View file

@ -56,10 +56,16 @@ func PrintPrettyStack(rvr interface{}) {
s := prettyStack{}
out, err := s.parse(debugStack, rvr)
if err == nil {
recovererErrorWriter.Write(out)
_, err = recovererErrorWriter.Write(out)
if err != nil {
os.Exit(101)
}
} else {
// print stdlib output as a fallback
os.Stderr.Write(debugStack)
_, err = os.Stderr.Write(debugStack)
if err != nil {
os.Exit(102)
}
}
}