qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Conway <acon...@redhat.com>
Subject Re: Review Request 45113: NO-JIRA: c++: Allow setting of conditions on endpoints.
Date Mon, 21 Mar 2016 19:40:32 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45113/
-----------------------------------------------------------

(Updated March 21, 2016, 7:40 p.m.)


Review request for qpid, Andrew Stitcher, Cliff Jansen, and Justin Ross.


Changes
-------

Fix typo.


Repository: qpid-proton-git


Description
-------

Allow setting conditions in the "close()" function for endpoints and transport.

Modified the proton::condition class as follows:
- normal value semantics, user can construct and copy conditions without surprises.
- memory safe: no core dumps, no dependency on endpoint lifecycle.

Example of use:

    // Close a link with an error.
    mylink.close(condition("myerr", "something went wrong"));

    // Throw condition "name: description" as a proton::error
    if (!session.condition().empty())
        throw proton::error(session.condition().what());

    // Save the condition to check/report/throw later
    condition save_error = connection.condition();


Diffs (updated)
-----

  proton-c/bindings/cpp/include/proton/condition.hpp 9e157f3c7963530f469d1fb40f52fa12fe57d7bd

  proton-c/bindings/cpp/include/proton/connection.hpp da7f806c745e2c52c4d2677fea669105d8c703ce

  proton-c/bindings/cpp/include/proton/endpoint.hpp d59e09324887c0f6cf22da99816cf0075f8b79b7

  proton-c/bindings/cpp/include/proton/link.hpp 8de2e7ba0f944e169560591ecbc4b32c182d8dee 
  proton-c/bindings/cpp/include/proton/session.hpp 014ab2a2d2b3c180a42162e7b22454492985f61c

  proton-c/bindings/cpp/include/proton/transport.hpp 9e32ac508a6c711b912aaadcb7bea5923e6b47e1

  proton-c/bindings/cpp/src/condition.cpp b60425130b2116ebba8a08b3fac58fe4aa95d549 
  proton-c/bindings/cpp/src/connection.cpp fc61190e900b9c2e48a98d06149221f03e30cd0a 
  proton-c/bindings/cpp/src/link.cpp 1ac730442018a4e93fad731941c888e600a68142 
  proton-c/bindings/cpp/src/session.cpp 545869f78ec1183a549f9c396908a530869ef1f6 
  proton-c/bindings/cpp/src/transport.cpp 88838064810e43dfbb2b44f51d87504d2a5d6d75 

Diff: https://reviews.apache.org/r/45113/diff/


Testing
-------


Thanks,

Alan Conway


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message