Skip to content

Postgresql exceptions #353

@jcristovao

Description

@jcristovao

Hello,

Perhaps I'm missing something obvious, but I somewhat was expecting withStmt' to return a SqlError, not a user error:

user error (Postgresql.withStmt': bad result status FatalError (("PGRES_FATAL_ERROR","ERROR: duplicate key value violates...

I guess this as to do with using fail which then gets turned into a UserError/IOError by with.

Would there be any way to bracket an insert just on SqlError, or do I have to bracket into the far more general IOError?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions