From d3bad7f328495d5746704f914fd335a2487ad2bb Mon Sep 17 00:00:00 2001 From: gotty Date: Fri, 19 Apr 2019 03:23:22 +0300 Subject: [PATCH] [LIB-9] Fix error in toString() function of exceptions --- src/main/java/org/hedgecode/chess/position/ParseException.java | 2 +- src/main/java/org/hedgecode/chess/uci/AcceptorException.java | 2 +- src/main/java/org/hedgecode/chess/uci/EngineException.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/hedgecode/chess/position/ParseException.java b/src/main/java/org/hedgecode/chess/position/ParseException.java index ac1b911..895ec61 100644 --- a/src/main/java/org/hedgecode/chess/position/ParseException.java +++ b/src/main/java/org/hedgecode/chess/position/ParseException.java @@ -52,7 +52,7 @@ public class ParseException extends Exception { sb.append(LOCALE_BUNDLE.getString(localeKey)); if (message != null) sb.append(": [").append(message).append("]"); - return message; + return sb.toString(); } } diff --git a/src/main/java/org/hedgecode/chess/uci/AcceptorException.java b/src/main/java/org/hedgecode/chess/uci/AcceptorException.java index f19da9a..0d0de88 100644 --- a/src/main/java/org/hedgecode/chess/uci/AcceptorException.java +++ b/src/main/java/org/hedgecode/chess/uci/AcceptorException.java @@ -55,7 +55,7 @@ public class AcceptorException extends Exception { ); if (message != null) sb.append(": [").append(message).append("]"); - return message; + return sb.toString(); } } diff --git a/src/main/java/org/hedgecode/chess/uci/EngineException.java b/src/main/java/org/hedgecode/chess/uci/EngineException.java index c48ec3c..06562f9 100644 --- a/src/main/java/org/hedgecode/chess/uci/EngineException.java +++ b/src/main/java/org/hedgecode/chess/uci/EngineException.java @@ -55,7 +55,7 @@ public class EngineException extends Exception { ); if (message != null) sb.append(": [").append(message).append("]"); - return message; + return sb.toString(); } } -- 2.10.0