Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Added hostname/db name to MongoException.Network message #85

Closed
wants to merge 1 commit into from

2 participants

@dkomanov

For network problem investigations.

@trishagee

I think this is a good idea, however it's now difficult to merge this change and we're doing all new functionality on the 3.x driver not the existing 2.x driver. The new driver outputs the server details when a network exception is thrown.

@trishagee trishagee closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 10, 2012
  1. @dkomanov
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/main/com/mongodb/DBTCPConnector.java
View
2  src/main/com/mongodb/DBTCPConnector.java
@@ -191,7 +191,7 @@ public WriteResult say( DB db , OutMessage m , WriteConcern concern , ServerAddr
_error( ioe, false );
if ( concern.raiseNetworkErrors() )
- throw new MongoException.Network( "can't say something" , ioe );
+ throw new MongoException.Network( "can't say something : " + port.host() + "/" + db , ioe );
CommandResult res = new CommandResult(port.serverAddress());
res.put( "ok" , false );
Something went wrong with that request. Please try again.