From 26e2d85512550dbecaa0f0a15df48ae4c434d44d Mon Sep 17 00:00:00 2001 From: Kenny Root Date: Mon, 5 May 2014 14:00:47 -0700 Subject: SSLEngineResult: better exception messages Bring these exception messages more in line with what the rest of libcore uses. Also print out the value that caused an exception to be thrown to aid in debugging. Change-Id: Ia2244592781091da9c3239c5f61946f6fb806204 --- luni/src/main/java/javax/net/ssl/SSLEngineResult.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'luni/src') diff --git a/luni/src/main/java/javax/net/ssl/SSLEngineResult.java b/luni/src/main/java/javax/net/ssl/SSLEngineResult.java index 8a98831..3360832 100644 --- a/luni/src/main/java/javax/net/ssl/SSLEngineResult.java +++ b/luni/src/main/java/javax/net/ssl/SSLEngineResult.java @@ -110,16 +110,16 @@ public class SSLEngineResult { public SSLEngineResult(SSLEngineResult.Status status, SSLEngineResult.HandshakeStatus handshakeStatus, int bytesConsumed, int bytesProduced) { if (status == null) { - throw new IllegalArgumentException("status is null"); + throw new IllegalArgumentException("status == null"); } if (handshakeStatus == null) { - throw new IllegalArgumentException("handshakeStatus is null"); + throw new IllegalArgumentException("handshakeStatus == null"); } if (bytesConsumed < 0) { - throw new IllegalArgumentException("bytesConsumed is negative"); + throw new IllegalArgumentException("bytesConsumed < 0: " + bytesConsumed); } if (bytesProduced < 0) { - throw new IllegalArgumentException("bytesProduced is negative"); + throw new IllegalArgumentException("bytesProduced < 0: " + bytesProduced); } this.status = status; this.handshakeStatus = handshakeStatus; -- cgit v1.1