Skip to content

Commit

Permalink
onError should be overloaded by subclass, otherwise callback installe…
Browse files Browse the repository at this point in the history
…rs are no longer available for that class.
  • Loading branch information
yourimoll committed Sep 21, 2018
1 parent 757feb1 commit ba532e0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions include/amqpcpp/deferredget.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,19 @@ class DeferredGet : public DeferredExtReceiver, public std::enable_shared_from_t
// allow chaining
return *this;
}

/**
* Register a function to be called when an error occurs. This should be defined, otherwise the base methods are used.
* @param callback
*/
DeferredGet &onError(const ErrorCallback &callback)
{
// store the callback
_errorCallback = callback;

// allow chaining
return *this;
}

/**
* Register a function to be called when a message arrives
Expand Down

0 comments on commit ba532e0

Please sign in to comment.