Uploaded image for project: 'Hot Rod Native client'
  1. Hot Rod Native client
  2. HRCPP-150

Always catch exceptions as const

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.0.0.CR2
    • 6.0.2.Final
    • None
    • None

    Description

      All exceptions should be caught as const. With inconsistent use of const/non-const, rethrown exception is not caught in non-const handler. I am not so sure about the above, the problem (actually HRCPP-119) was in fact caused by HotRodClientException not inheriting from Exception.

      Also, for rethrowing exceptions use throw; (not throw e; - this causes the exception to be sliced to the caught type, blocking polymorphism)

      Attachments

        Issue Links

          Activity

            People

              rvansa1@redhat.com Radim Vansa (Inactive)
              rvansa1@redhat.com Radim Vansa (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: