Skip to content

Enable use of displayException when generating payload of InternalError #1868

@JBetz

Description

@JBetz

Specifically here:

text <- evaluate (T.pack $ show x) `catchAny` \_ ->

The advantage being that you no longer have to use newtypes and Show to produce something human-readable, especially since using Show for pretty printing is becoming more and more of an anti-pattern in Haskell.

It also means that you can take advantage of the work already done by library authors to provide human-readable exceptions. For example: https://github.com/nikita-volkov/hasql/blob/c74c5829c4d3af685c10717b46c73108a9155871/library/Hasql/Errors.hs#L23-L89

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions