Skip to content

Commit

Permalink
don't use panic inside error formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
ysmood committed Dec 22, 2020
1 parent 19825f3 commit f5845b6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion error.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ type ErrCovered struct {

// Error ...
func (e *ErrCovered) Error() string {
return fmt.Sprintf("element covered by: %v", e.MustHTML())
info, _ := e.HTML()
return fmt.Sprintf("element covered by: %s", info)
}

// Unwrap ...
Expand Down

0 comments on commit f5845b6

Please sign in to comment.