[JAVA-752] Make exception message say timeout if exception was caused by a socket timeout exception Created: 06/Feb/13 Updated: 31/Mar/15 Resolved: 25/Jun/13 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Monitoring |
| Affects Version/s: | None |
| Fix Version/s: | 3.0.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | John Feibusch | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
We got the exception below. I think it's caused by a socket timeout, but from the exception message below, it's apparently not possible to know for sure. I would like the MongoException message to be different if the IOException is a SocketTimeoutException. Something like "socket timeout trying to call something" rather than "can't call something". Here is the exception. I am not asking for help troubleshooting this exception, I am including it as an example. com.mongodb.MongoException$Network: can't call something : (host info removed) |
| Comments |
| Comment by Jeffrey Yemin [ 31/Mar/15 ] | |||||||||||||||||||||||||||
|
Closing all resolved 3.0.0 issues, as 3.0.0 has been tagged and released. | |||||||||||||||||||||||||||
| Comment by Jeffrey Yemin [ 25/Jun/13 ] | |||||||||||||||||||||||||||
|
In 3.0.x there is a specific exception subtype for timeouts. See | |||||||||||||||||||||||||||
| Comment by Jeffrey Yemin [ 08/Feb/13 ] | |||||||||||||||||||||||||||
|
Hi John, It's common practice to log chained exceptions this way. I think your best best is to increase the character/line count of your exception handler. | |||||||||||||||||||||||||||
| Comment by John Feibusch [ 07/Feb/13 ] | |||||||||||||||||||||||||||
|
Unfortunately it looks like our exception handler, which logs this stack trace, only logs the first 600 characters or so. So the nested exception that you show doesn't appear in our logs. | |||||||||||||||||||||||||||
| Comment by Scott Hernandez (Inactive) [ 06/Feb/13 ] | |||||||||||||||||||||||||||
|
Can you include the full exception stack you are getting, included the nested ones? In the case of an IOException (like SocketTimeoutException) as the cause then it is included as a nested exception:
|