Details
-
Bug
-
Resolution: Done
-
Major - P3
-
None
-
None
Description
Currently if there is an application error in the server when executing, say, a command, the driver takes the error message from "err" and puts in it a MongoException, so you might see something like:
Caused by: com.mongodb.MongoException: writeback
|
at com.mongodb.CommandResult.getException(CommandResult.java:100) ~[mongo.jar:na]
|
at com.mongodb.CommandResult.throwOnError(CommandResult.java:134) ~[mongo.jar:na]
|
It would be useful in many cases to include the host and port of the server that generated the error, e.g.
Caused by: com.mongodb.MongoException: error: writeback,
|
server: localhost:30000
|
at com.mongodb.CommandResult.getException(CommandResult.java:100) ~[mongo.jar:na]
|
at com.mongodb.CommandResult.throwOnError(CommandResult.java:134) ~[mongo.jar:na]
|