@@ -100,7 +100,7 @@ int StartProducer(CProducer* producer) {
100
100
try {
101
101
((DefaultMQProducer*)producer)->start ();
102
102
} catch (exception & e) {
103
- MQClientErrorContainer::instance ()-> setErr (string (e.what ()));
103
+ MQClientErrorContainer::setErr (string (e.what ()));
104
104
return PRODUCER_START_FAILED;
105
105
}
106
106
return OK;
@@ -156,7 +156,7 @@ int SendMessageSync(CProducer* producer, CMessage* msg, CSendResult* result) {
156
156
strncpy (result->msgId , sendResult.getMsgId ().c_str (), MAX_MESSAGE_ID_LENGTH - 1 );
157
157
result->msgId [MAX_MESSAGE_ID_LENGTH - 1 ] = 0 ;
158
158
} catch (exception & e) {
159
- MQClientErrorContainer::instance ()-> setErr (string (e.what ()));
159
+ MQClientErrorContainer::setErr (string (e.what ()));
160
160
return PRODUCER_SEND_SYNC_FAILED;
161
161
}
162
162
return OK;
@@ -219,7 +219,7 @@ int SendMessageAsync(CProducer* producer,
219
219
delete cSendCallback;
220
220
cSendCallback = NULL ;
221
221
}
222
- MQClientErrorContainer::instance ()-> setErr (string (e.what ()));
222
+ MQClientErrorContainer::setErr (string (e.what ()));
223
223
return PRODUCER_SEND_ASYNC_FAILED;
224
224
}
225
225
return OK;
@@ -249,7 +249,7 @@ int SendMessageOnewayOrderly(CProducer* producer, CMessage* msg, QueueSelectorCa
249
249
SelectMessageQueue selectMessageQueue (selector);
250
250
defaultMQProducer->sendOneway (*message, &selectMessageQueue, arg);
251
251
} catch (exception & e) {
252
- MQClientErrorContainer::instance ()-> setErr (string (e.what ()));
252
+ MQClientErrorContainer::setErr (string (e.what ()));
253
253
return PRODUCER_SEND_ONEWAY_FAILED;
254
254
}
255
255
return OK;
@@ -276,7 +276,7 @@ int SendMessageOrderlyAsync(CProducer* producer,
276
276
} catch (exception & e) {
277
277
printf (" %s\n " , e.what ());
278
278
// std::count<<e.what( )<<std::endl;
279
- MQClientErrorContainer::instance ()-> setErr (string (e.what ()));
279
+ MQClientErrorContainer::setErr (string (e.what ()));
280
280
return PRODUCER_SEND_ORDERLYASYNC_FAILED;
281
281
}
282
282
return OK;
@@ -303,7 +303,7 @@ int SendMessageOrderly(CProducer* producer,
303
303
strncpy (result->msgId , sendResult.getMsgId ().c_str (), MAX_MESSAGE_ID_LENGTH - 1 );
304
304
result->msgId [MAX_MESSAGE_ID_LENGTH - 1 ] = 0 ;
305
305
} catch (exception & e) {
306
- MQClientErrorContainer::instance ()-> setErr (string (e.what ()));
306
+ MQClientErrorContainer::setErr (string (e.what ()));
307
307
return PRODUCER_SEND_ORDERLY_FAILED;
308
308
}
309
309
return OK;
0 commit comments