error callbacks get a const char *, no longer a std::string
This commit is contained in:
parent
301b8153e3
commit
3b78247363
|
|
@ -485,7 +485,7 @@ public:
|
||||||
* Report an error message on a channel
|
* Report an error message on a channel
|
||||||
* @param message
|
* @param message
|
||||||
*/
|
*/
|
||||||
void reportError(const std::string &message)
|
void reportError(const char *message)
|
||||||
{
|
{
|
||||||
// change state
|
// change state
|
||||||
_state = state_closed;
|
_state = state_closed;
|
||||||
|
|
@ -496,7 +496,7 @@ public:
|
||||||
// @todo should this be a std::string parameter?
|
// @todo should this be a std::string parameter?
|
||||||
|
|
||||||
// inform handler
|
// inform handler
|
||||||
if (_errorCallback) _errorCallback(message.c_str());
|
if (_errorCallback) _errorCallback(message);
|
||||||
|
|
||||||
// leap out if channel is already destructed, or when there are no further callbacks
|
// leap out if channel is already destructed, or when there are no further callbacks
|
||||||
if (!monitor.valid() || !_oldestCallback) return;
|
if (!monitor.valid() || !_oldestCallback) return;
|
||||||
|
|
|
||||||
|
|
@ -117,28 +117,11 @@ protected:
|
||||||
* @param error Description of the error that occured
|
* @param error Description of the error that occured
|
||||||
* @return Deferred Next deferred result
|
* @return Deferred Next deferred result
|
||||||
*/
|
*/
|
||||||
Deferred *reportError(const std::string& error)
|
|
||||||
{
|
|
||||||
// from this moment on the object should be listed as failed
|
|
||||||
_failed = true;
|
|
||||||
|
|
||||||
// execute callbacks if registered
|
|
||||||
if (_errorCallback) _errorCallback(error.c_str());
|
|
||||||
if (_finalizeCallback) _finalizeCallback();
|
|
||||||
|
|
||||||
// return the next deferred result
|
|
||||||
return _next;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Indicate failure
|
|
||||||
* @param error description of the error that occured
|
|
||||||
*/
|
|
||||||
Deferred *reportError(const char *error)
|
Deferred *reportError(const char *error)
|
||||||
{
|
{
|
||||||
// from this moment on the object should be listed as failed
|
// from this moment on the object should be listed as failed
|
||||||
_failed = true;
|
_failed = true;
|
||||||
|
|
||||||
// execute callbacks if registered
|
// execute callbacks if registered
|
||||||
if (_errorCallback) _errorCallback(error);
|
if (_errorCallback) _errorCallback(error);
|
||||||
if (_finalizeCallback) _finalizeCallback();
|
if (_finalizeCallback) _finalizeCallback();
|
||||||
|
|
|
||||||
|
|
@ -156,7 +156,7 @@ public:
|
||||||
if (!channel) return false;
|
if (!channel) return false;
|
||||||
|
|
||||||
// report to the handler
|
// report to the handler
|
||||||
channel->reportError(text());
|
channel->reportError(_text.value().c_str());
|
||||||
|
|
||||||
// done
|
// done
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue