From 1ab1bd1e3870ed5d467a47bc7c92e90e54efcaa7 Mon Sep 17 00:00:00 2001 From: Nikita Volkov Date: Sun, 22 Nov 2015 09:30:59 +0300 Subject: [PATCH] Docs --- hasql.cabal | 2 +- library/Hasql.hs | 25 +++++++++++++++---------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/hasql.cabal b/hasql.cabal index 2843679..89d2992 100644 --- a/hasql.cabal +++ b/hasql.cabal @@ -1,7 +1,7 @@ name: hasql version: - 0.12.1 + 0.12.1.1 category: Hasql, Database, PostgreSQL synopsis: diff --git a/library/Hasql.hs b/library/Hasql.hs index 81a76be..c815ef0 100644 --- a/library/Hasql.hs +++ b/library/Hasql.hs @@ -54,22 +54,27 @@ data ResultsError = -- Decoder error details. data ResultError = -- | - -- An error reported by the DB. Code, message, details, hint. + -- An error reported by the DB. + -- Consists of the following: Code, message, details, hint. -- - -- * The SQLSTATE code for the error. The SQLSTATE code identifies the type of error that has occurred; - -- it can be used by front-end applications to perform specific operations (such as error handling) - -- in response to a particular database error. - -- For a list of the possible SQLSTATE codes, see Appendix A. - -- This field is not localizable, and is always present. + -- * __Code__. + -- The SQLSTATE code for the error. + -- It's recommended to use + -- + -- to work with those. -- - -- * The primary human-readable error message (typically one line). Always present. + -- * __Message__. + -- The primary human-readable error message (typically one line). Always present. -- - -- * Detail: an optional secondary error message carrying more detail about the problem. + -- * __Details__. + -- An optional secondary error message carrying more detail about the problem. -- Might run to multiple lines. -- - -- * Hint: an optional suggestion what to do about the problem. + -- * __Hint__. + -- An optional suggestion on what to do about the problem. -- This is intended to differ from detail in that it offers advice (potentially inappropriate) - -- rather than hard facts. Might run to multiple lines. + -- rather than hard facts. + -- Might run to multiple lines. ServerError !ByteString !ByteString !(Maybe ByteString) !(Maybe ByteString) | -- | -- The database returned an unexpected result.