kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | c064b2b20c54532b384ddff4d54a0b1bd7d1e75c88e020ec0aecde4f02f6fa02 |
|---|---|
| Author | Vishy Kasar <vkasar@apple.com> · 2016-07-14 11:53 -07:00 |
| Committer | olim7t <omichallat+github@gmail.com> · 2016-08-30 13:22 -07:00 |
| Parents | 1b13768b4d6e |
5 files changed
modified changelog/README.md +1 −0
| @@ -2,6 +2,7 @@ | ||
| 2 | 2 | |
| 3 | 3 | ### 3.0.4 (in progress) |
| 4 | 4 | |
| 5 | +- [improvement] JAVA-1246: Driver swallows the real exception in a few cases | |
| 5 | 6 | |
| 6 | 7 | ### 3.0.3 |
| 7 | 8 |
modified driver-core/src/main/java/com/datastax/driver/core/Cluster.java +1 −1
| @@ -846,7 +846,7 @@ | ||
| 846 | 846 | addContactPoints(InetAddress.getAllByName(address)); |
| 847 | 847 | return this; |
| 848 | 848 | } catch (UnknownHostException e) { |
| 849 | - throw new IllegalArgumentException(e.getMessage()); | |
| 849 | + throw new IllegalArgumentException("Failed to add contact point: " + address, e); | |
| 850 | 850 | } |
| 851 | 851 | } |
| 852 | 852 |
modified driver-core/src/main/java/com/datastax/driver/core/Frame.java +2 −2
| @@ -234,9 +234,9 @@ | ||
| 234 | 234 | // it there). |
| 235 | 235 | return Frame.create(frame); |
| 236 | 236 | } catch (CorruptedFrameException e) { |
| 237 | - throw new DriverInternalError(e.getMessage()); | |
| 237 | + throw new DriverInternalError(e); | |
| 238 | 238 | } catch (TooLongFrameException e) { |
| 239 | - throw new DriverInternalError(e.getMessage()); | |
| 239 | + throw new DriverInternalError(e); | |
| 240 | 240 | } |
| 241 | 241 | } |
| 242 | 242 | } |
modified driver-core/src/main/java/com/datastax/driver/core/ReplicationStategy.java +2 −0
| @@ -29,6 +29,7 @@ | ||
| 29 | 29 | * Note: it's not an interface mainly because we don't want to expose it. |
| 30 | 30 | */ |
| 31 | 31 | abstract class ReplicationStrategy { |
| 32 | + private static final Logger logger = LoggerFactory.getLogger(ReplicationStrategy.class); | |
| 32 | 33 | |
| 33 | 34 | static ReplicationStrategy create(Map<String, String> replicationOptions) { |
| 34 | 35 | |
| @@ -55,6 +56,7 @@ | ||
| 55 | 56 | } |
| 56 | 57 | } catch (NumberFormatException e) { |
| 57 | 58 | // Cassandra wouldn't let that pass in the first place so this really should never happen |
| 59 | + logger.error("Failed to parse replication options: " + replicationOptions, e); | |
| 58 | 60 | return null; |
| 59 | 61 | } |
| 60 | 62 | } |
modified driver-core/src/test/java/com/datastax/driver/core/TestUtils.java +1 −1
| @@ -729,7 +729,7 @@ | ||
| 729 | 729 | try { |
| 730 | 730 | socket.close(); |
| 731 | 731 | } catch (IOException e) { |
| 732 | - logger.warn("Error closing socket to " + address); | |
| 732 | + logger.warn("Error closing socket to " + address, e); | |
| 733 | 733 | } |
| 734 | 734 | } |
| 735 | 735 | return connectionSuccessful; |