vendredi 21 juin 2019

How to Fix the exception recived from poco library

When client create an instant on SenderThread. It can send data to and from. But when client goes for suspend mode and come back from suspend. The last created threads get exception on resume. and no data is sent.

Exception Details received :

displayText = Exception

message =

name = Exception

className = N4Poco9ExceptionE

class SenderThread: public Poco::Runnable
{
public:
    MyThread(const std::string& msg):
        Msg(msg);
    {
    }

    void run()
    {
        try {
        SendData(msg);
       } catch(Exception exp) {
           std::cout<<"displayText = "<<e.displayText()<<std::endl;
           std::cout<<"message = "<<e.message()<<std::endl;
           std::cout<<"name = "<<e.name()<<std::endl;
           std::cout<<"className = "<<e.className()<<std::endl;

        }

    }

private:
    std::string Msg;

};

How can i get more details on the exception and how to handle this exception.

Aucun commentaire:

Enregistrer un commentaire