[GHC] #12902: Improve handle decoding error messages

GHC ghc-devs at haskell.org
Wed Nov 30 12:50:27 UTC 2016


#12902: Improve handle decoding error messages
-------------------------------------+-------------------------------------
           Reporter:  Profpatsch     |             Owner:
               Type:  feature        |            Status:  new
  request                            |
           Priority:  normal         |         Milestone:
          Component:                 |           Version:  8.0.1
  libraries/base                     |
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 When handle decoding encounters a byte sequence it cannot handle and
 `ErrorOnCodingFailure` is set, at the moment
 [https://hackage.haskell.org/package/base-4.9.0.0/docs/src/GHC.IO.Encoding.Failure.html#ioe_decodingError
 an IO error with a pretty non-descriptive messages is thrown] (`invalid
 byte sequence`).

 The user should get a bit more Information in that case:

 1) What was the byte sequence that caused the error (and if possible where
 in the input, of course hard with handles)

 2) A stack trace of the functions that caused this (probably from
 `hGetContents` and similar upwards

 It’s a very hard-to-debug error with the current implementation.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12902>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list