From a99db9979c7793ce6ca3089f62140952ad7b6533 Mon Sep 17 00:00:00 2001
From: ribeaudc <ribeaudc>
Date: Mon, 7 Jan 2008 10:47:09 +0000
Subject: [PATCH] change: - Put more explicit error messages.

SVN: 3333
---
 .../java/ch/systemsx/cisd/bds/hcs/HCSImageFormattedData.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bds/source/java/ch/systemsx/cisd/bds/hcs/HCSImageFormattedData.java b/bds/source/java/ch/systemsx/cisd/bds/hcs/HCSImageFormattedData.java
index d734dde6b11..55e29a3ae6a 100644
--- a/bds/source/java/ch/systemsx/cisd/bds/hcs/HCSImageFormattedData.java
+++ b/bds/source/java/ch/systemsx/cisd/bds/hcs/HCSImageFormattedData.java
@@ -92,12 +92,12 @@ public final class HCSImageFormattedData extends AbstractFormattedData implement
     {
         if (channel < 1)
         {
-            throw new IndexOutOfBoundsException(String.format("Channel index starts at 1.", channel));
+            throw new IndexOutOfBoundsException(String.format("Channel index must start at 1 (given value is %d).", channel));
         }
         final int channelCount = getChannelCount();
         if (channel > channelCount)
         {
-            throw new IndexOutOfBoundsException(String.format("%d > %d", channel, channelCount));
+            throw new IndexOutOfBoundsException(String.format("Channel index %d exceeds the number of channels %d", channel, channelCount));
         }
     }
 
-- 
GitLab