Uploaded image for project: 'RAML Module Builder'
  1. RAML Module Builder
  2. RMB-2 RMB: unit tests and code cleanup
  3. RMB-15

return complete Throwable in PostgresClient's replyHandlers

    XMLWordPrintable

Details

    • Sub-task
    • Status: Closed (View Workflow)
    • P2
    • Resolution: Done
    • None
    • None
    • CP: Non-roadmap backlog

    Description

      When there is a failure in PostgresClient the replyHandler does not get the complete Throwable, it only gets the message:

      • query.cause().getMessage()
      • e.getMessage()

      It should get the complete Throwable:

      • query.cause()
      • e

      That way the invoking program can better handle the different kinds of exceptions, for example to create special return codes and explanations on database constraint errors regarding unique keys or foreign keys. The complete Throwable enables the invoking program to do tests like this:
      if (asyncResult.getCause() instanceof GenericDatabaseException)
      and to directly access the fields of the map GenericDatabaseException.errorMessage().fields().

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                julianladisch Julian Ladisch
                julianladisch Julian Ladisch
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases