You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2026/04/04 11:43:21 UTC

(commons-codec) branch master updated: Better exception message

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-codec.git


The following commit(s) were added to refs/heads/master by this push:
     new 7491b61b Better exception message
7491b61b is described below

commit 7491b61bf58b469be093ef4ea4bd9708bcf74cf9
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Apr 4 07:43:15 2026 -0400

    Better exception message
---
 src/main/java/org/apache/commons/codec/binary/Base58.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/commons/codec/binary/Base58.java b/src/main/java/org/apache/commons/codec/binary/Base58.java
index ec27470f..7c69fc31 100644
--- a/src/main/java/org/apache/commons/codec/binary/Base58.java
+++ b/src/main/java/org/apache/commons/codec/binary/Base58.java
@@ -160,7 +160,7 @@ public class Base58 extends BaseNCodec {
             final byte b = base58Data[i];
             final int digit = b < DECODE_TABLE.length ? DECODE_TABLE[b] : -1;
             if (digit < 0) {
-                throw new IllegalArgumentException("Invalid character in Base58 string: " + (char) b);
+                throw new IllegalArgumentException(String.format("Invalid character in Base58 string: 0x%02x", b));
             }
             value = value.add(BigInteger.valueOf(digit).multiply(power));
             power = power.multiply(base);