onError should be overloaded by subclass, otherwise callback installers are no longer available for that class.

This commit is contained in:
Youri Moll 2018-09-21 12:26:23 +02:00
parent 757feb10c6
commit ba532e0434
1 changed files with 13 additions and 0 deletions

View File

@ -103,6 +103,19 @@ public:
// 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