Skip to content

Commit

Permalink
Add 'gziphandler: ' prefix to panics
Browse files Browse the repository at this point in the history
  • Loading branch information
tmthrgd committed Dec 2, 2017
1 parent 873ffdb commit 801ee1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gzip.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func (w *responseWriter) startPassThrough() (err error) {

func (w *responseWriter) releaseBuffer() {
if w.buf == nil {
panic("w.buf is nil in call to emptyBuffer")
panic("gziphandler: w.buf is nil in call to emptyBuffer")
}

*w.buf = (*w.buf)[:0]
Expand Down Expand Up @@ -254,7 +254,7 @@ func (w *responseWriter) handleContentType() bool {
func (w *responseWriter) Close() error {
switch {
case w.buf != nil && w.gw != nil:
panic("both buf and gw are non nil in call to Close")
panic("gziphandler: both buf and gw are non nil in call to Close")
// Buffer not nil means the regular response must
// be returned.
case w.buf != nil:
Expand Down

0 comments on commit 801ee1d

Please sign in to comment.