Fix lint errors related to not checking errors
This commit is contained in:
parent
7f71ff9a2e
commit
52d4c47e43
7 changed files with 54 additions and 10 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue