add error message to internal errors

reopens #107
This commit is contained in:
Lucas Clemente
2016-05-17 12:49:40 +02:00
parent 1359c0e49c
commit e4a7386ca1
2 changed files with 3 additions and 3 deletions

View File

@@ -40,6 +40,6 @@ func ToQuicError(err error) *QuicError {
case ErrorCode: case ErrorCode:
return Error(e, "") return Error(e, "")
} }
utils.Errorf("BUG: Unknown error encountered: %#v", err) utils.Errorf("Internal error: %v", err)
return Error(InternalError, "") return Error(InternalError, err.Error())
} }

View File

@@ -36,7 +36,7 @@ var _ = Describe("Quic error", func() {
}) })
It("changes default errors to InternalError", func() { It("changes default errors to InternalError", func() {
Expect(qerr.ToQuicError(io.EOF)).To(Equal(qerr.Error(qerr.InternalError, ""))) Expect(qerr.ToQuicError(io.EOF)).To(Equal(qerr.Error(qerr.InternalError, "EOF")))
}) })
}) })
}) })