Skip to content
This repository

Modify Parser error value #104

snoyberg opened this Issue December 26, 2012 · 4 comments

2 participants

Michael Snoyman Bryan O'Sullivan
Michael Snoyman

Motivated by yesodweb/persistent#60.

It would be nice to be able to provide more information for an error message. For example:

parseJSON (Object o) = modifyFailure
    (\s -> "Parsing of the Persistent config file failed: " ++ s)
    (Foo <$> o .: "someField")

Currently, I could do something like <|> fail "Parsing of Persistent config file failed", but I can't get access to the original error message.

Michael Snoyman snoyberg referenced this issue in yesodweb/persistent December 26, 2012

Error handling in configuration #60

Bryan O'Sullivan

Sure, that looks handy. Want to submit a patch?

Michael Snoyman snoyberg referenced this issue from a commit in snoyberg/aeson January 01, 2013
Michael Snoyman modifyFailure (bos/aeson#104) 34d4636
Michael Snoyman

Pull request #106 sent.

Bryan O'Sullivan bos closed this January 02, 2013
Bryan O'Sullivan
bos commented January 02, 2013

Aaand fixed.

Michael Snoyman

Would it be possible to release a new version of aeson with this change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.