@@ -100,7 +100,7 @@ int StartProducer(CProducer* producer) {
100100 try {
101101 ((DefaultMQProducer*)producer)->start ();
102102 } catch (exception& e) {
103- MQClientErrorContainer::instance ()-> setErr (string (e.what ()));
103+ MQClientErrorContainer::setErr (string (e.what ()));
104104 return PRODUCER_START_FAILED;
105105 }
106106 return OK;
@@ -156,7 +156,7 @@ int SendMessageSync(CProducer* producer, CMessage* msg, CSendResult* result) {
156156 strncpy (result->msgId , sendResult.getMsgId ().c_str (), MAX_MESSAGE_ID_LENGTH - 1 );
157157 result->msgId [MAX_MESSAGE_ID_LENGTH - 1 ] = 0 ;
158158 } catch (exception& e) {
159- MQClientErrorContainer::instance ()-> setErr (string (e.what ()));
159+ MQClientErrorContainer::setErr (string (e.what ()));
160160 return PRODUCER_SEND_SYNC_FAILED;
161161 }
162162 return OK;
@@ -219,7 +219,7 @@ int SendMessageAsync(CProducer* producer,
219219 delete cSendCallback;
220220 cSendCallback = NULL ;
221221 }
222- MQClientErrorContainer::instance ()-> setErr (string (e.what ()));
222+ MQClientErrorContainer::setErr (string (e.what ()));
223223 return PRODUCER_SEND_ASYNC_FAILED;
224224 }
225225 return OK;
@@ -249,7 +249,7 @@ int SendMessageOnewayOrderly(CProducer* producer, CMessage* msg, QueueSelectorCa
249249 SelectMessageQueue selectMessageQueue (selector);
250250 defaultMQProducer->sendOneway (*message, &selectMessageQueue, arg);
251251 } catch (exception& e) {
252- MQClientErrorContainer::instance ()-> setErr (string (e.what ()));
252+ MQClientErrorContainer::setErr (string (e.what ()));
253253 return PRODUCER_SEND_ONEWAY_FAILED;
254254 }
255255 return OK;
@@ -276,7 +276,7 @@ int SendMessageOrderlyAsync(CProducer* producer,
276276 } catch (exception& e) {
277277 printf (" %s\n " , e.what ());
278278 // std::count<<e.what( )<<std::endl;
279- MQClientErrorContainer::instance ()-> setErr (string (e.what ()));
279+ MQClientErrorContainer::setErr (string (e.what ()));
280280 return PRODUCER_SEND_ORDERLYASYNC_FAILED;
281281 }
282282 return OK;
@@ -303,7 +303,7 @@ int SendMessageOrderly(CProducer* producer,
303303 strncpy (result->msgId , sendResult.getMsgId ().c_str (), MAX_MESSAGE_ID_LENGTH - 1 );
304304 result->msgId [MAX_MESSAGE_ID_LENGTH - 1 ] = 0 ;
305305 } catch (exception& e) {
306- MQClientErrorContainer::instance ()-> setErr (string (e.what ()));
306+ MQClientErrorContainer::setErr (string (e.what ()));
307307 return PRODUCER_SEND_ORDERLY_FAILED;
308308 }
309309 return OK;
0 commit comments