Exception Handling at work and exception handling at work

Source: Internet
Author: User

Exception Handling at work and exception handling at work

1) Exception: shutdown failed: ENOTCONN (Transport endpoint is not connected)

Problem description:

An exception occurs during socket shutdonwOutput. This problem may be caused by multiple attempts to close the same socket. The reason for this problem is that both the server and client are disconnected:

Run one end (implemented by qt): socket-> disconnectFromHost (); socket-> close ();

Socket. shutdownOutput (); socket. close ();

Solution:

Close only at one end.


How to solve problems encountered at work

At work, everyone will encounter many problems. In the face of problems, we should discuss how to solve them, how to deal with them, how to reduce the problems, and finally how to eliminate the problems. Sometimes, problems and difficulties are not the cause of difficulties in your life. The deciding factor is that you treat the difficult mentality. Different perspectives on difficulties lead to different results after difficulties, most people are troubled by the negative and negative emotions in the face of difficulties, rather than the difficulties themselves. These negative feelings make them stuck, making it difficult to think about and solve the problem. If you are still troubled by problems in your life, please take the following seven steps to help you solve the problem and eliminate difficulties. 1. Check the problem. When you are in trouble, first check your problem, to see what it is, and then try to solve different problems. To examine your problem, you need to understand the problem, find the root cause of the problem, and then solve the problem from the root cause. 2. Face up to problems in the face of problems, you should be brave enough to bear the problem, face up to your problems, face up to the ground, do not choose to escape. The Avoidance does not solve the problem, but this kind of ignoring will cause greater and more persistent harm. Therefore, be brave and strong in the face of problems. 3. there is no way to solve the problem. The problem can only disappear when you decide to solve it. Therefore, do not avoid the problem, solve the problem if necessary, or complain blindly, complaining is not a solution. After complaining, you still need to solve the problem. Therefore, we are brave enough to solve the problem so as to overcome the difficulties. 4. After you continue to solve the problem, you should continue to move forward. Do not be disturbed by the problems that have been resolved, or think over and over again, this will only bring tension and anxiety to you. Look forward and move forward. Do not make the past problems a stumbling block to your present situation. 5. sum up experience in the process of overcoming difficulties. When a similar problem occurs, you will know how to solve the problem. When you learn from difficulties, you will have new thoughts and discoveries. In this way, you can constantly supplement your abilities to make your work better. When encountering difficulties, it is also a kind of learning. Summing up experience in difficulties is far better than resentment. 6. Never be discouraged. Don't start to doubt your abilities and be discouraged because of one or more failures. The problem is inevitable for everyone. Do not let the problem become a yardstick for measuring the value of your life. In the process of solving the problem, you can also improve your ability. Therefore, never be scared by problems. Problems can bring you more opportunities. 7. Always prepare for all kinds of problems in your life. Before the problem arrives, we should prepare for difficulties and solve the problem. The problem is sometimes the most important part of life. Accept the problem, greet the problem with a positive attitude, and always prepare to solve the problem so that it will succeed.

How do you deal with exceptions in actual work? What should I do?

We often encounter unexpected situations in our lives and work. This requires us to be calm, even in emergencies.
Only in this way can we come up with a solution. Hope to be useful to you

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.