Skip to content

Commit 027770b

Browse files
committed
refactor: Use %w for wrapping errors
1 parent 8e189df commit 027770b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func main() {
4545
log.Printf("Error during execution: %s", err.Error())
4646
executionFailedCounter++
4747
if executionFailedCounter > MaximumFailedExecutionBeforePanic {
48-
panic(fmt.Errorf("execution failed %d times: %v", executionFailedCounter, err))
48+
panic(fmt.Errorf("execution failed %d times: %w", executionFailedCounter, err))
4949
}
5050
} else if executionFailedCounter > 0 {
5151
log.Printf("Execution was successful after %d failed attempts, resetting counter to 0", executionFailedCounter)

0 commit comments

Comments
 (0)