[prev in list] [next in list] [prev in thread] [next in thread]
List: jakarta-commons-dev
Subject: [commons-imaging] 02/05: Throw IllegalArgumentException instead of Error
From: ggregory () apache ! org
Date: 2023-08-31 14:04:28
Message-ID: 20230831140426.3098B440504 () gitbox2-he-fi ! apache ! org
[Download RAW message or body]
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-imaging.git
commit eb864e6cb3bc66f3348861b65540711cfee9b87e
Author: Gary Gregory <garydgregory@gmail.com>
AuthorDate: Thu Aug 31 09:30:42 2023 -0400
Throw IllegalArgumentException instead of Error
---
.../java/org/apache/commons/imaging/palette/LongestAxisMedianCut.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/commons/imaging/palette/LongestAxisMedianCut.java \
b/src/main/java/org/apache/commons/imaging/palette/LongestAxisMedianCut.java index \
8bc06bab..4801e95f 100644
--- a/src/main/java/org/apache/commons/imaging/palette/LongestAxisMedianCut.java
+++ b/src/main/java/org/apache/commons/imaging/palette/LongestAxisMedianCut.java
@@ -88,7 +88,7 @@ public class LongestAxisMedianCut implements MedianCut {
limit = medianValue.blue;
break;
default:
- throw new Error("Bad mode.");
+ throw new IllegalArgumentException("Bad mode " + mode);
}
colorGroup.cut = new ColorGroupCut(less, more, mode, limit);
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic