... by making it conform to CustomStringConvertible and CustomDebugStringConvertible.
Currently, print(error as! PSQLError) will print something like this:
PSQLError(backing: PostgresNIO.PSQLError.(unknown context at $100aeb99c).Backing)
which is not very helpful.
I would propose to add a description to PSQLError that uses some of the infos provided in .code, .serverInfo and other properties to convey a more helpfull message.
And I can tackle this myself, unless someone else wants to do it... 😄
... by making it conform to
CustomStringConvertible
andCustomDebugStringConvertible
.Currently,
print(error as! PSQLError)
will print something like this:PSQLError(backing: PostgresNIO.PSQLError.(unknown context at $100aeb99c).Backing)
which is not very helpful.I would propose to add a description to PSQLError that uses some of the infos provided in
.code
,.serverInfo
and other properties to convey a more helpfull message.And I can tackle this myself, unless someone else wants to do it... 😄