Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hi, how to control this ex? #4

Open
mark-wang-sh opened this issue Aug 10, 2016 · 2 comments
Open

hi, how to control this ex? #4

mark-wang-sh opened this issue Aug 10, 2016 · 2 comments

Comments

@mark-wang-sh
Copy link

An exception of type 'System.Net.Sockets.SocketException' occurred in System.dll but was not handled in user code

Additional information: No connection could be made because the target machine actively refused it

This exception cannot be captured by trycatch

@mark-wang-sh
Copy link
Author

try
            {
                XmlConfigurator.Configure();
                logger.Debug("Sample debug message");
                logger.Info("Sample informational message");
                logger.Error("Error");
            }
            catch (Exception ex)
            {
                logger.Error("ttt");
            }

@marksl
Copy link
Owner

marksl commented Aug 11, 2016

Possibly your call to logger.Error("ttt") in the catch block is thrown the unhandled exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants