summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2003-10-15 13:12:00 +0000
committerPeter Palfrader <peter@palfrader.org>2003-10-15 13:12:00 +0000
commitf2a19242299e39a63970818e81cba56d8e9f6258 (patch)
treea0cde9cff6c3959f56a28e42148dab59f9bf6267
parent355c07de6d5252fe6da46f7a2bde6ac71e8c3d81 (diff)
Use IllegalArgumentException instead of Error
-rw-r--r--src/org/noreply/fancydress/type3/SingleLeg.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/noreply/fancydress/type3/SingleLeg.java b/src/org/noreply/fancydress/type3/SingleLeg.java
index 9193cd6..fe138b7 100644
--- a/src/org/noreply/fancydress/type3/SingleLeg.java
+++ b/src/org/noreply/fancydress/type3/SingleLeg.java
@@ -106,9 +106,9 @@ public abstract class SingleLeg {
Routing routing)
{
if (sharedSecret.length != CryptoPrimitives.KEY_LEN)
- throw new Error("sharedSecret must be KEY_LEN bytes long.");
+ throw new IllegalArgumentException("sharedSecret must be KEY_LEN bytes long.");
if (digest.length != CryptoPrimitives.HASH_LEN)
- throw new Error("digest must be HASH_LEN bytes long.");
+ throw new IllegalArgumentException("digest must be HASH_LEN bytes long.");
byte[] fixedPart = new byte[MIN_SH];
byte[] dynamicPart = routing.getRoutingInformation();
int routingSize = dynamicPart.length;