From: gotty Date: Fri, 19 Apr 2019 00:23:22 +0000 (+0300) Subject: [LIB-9] Fix error in toString() function of exceptions X-Git-Url: https://git.hedgecode.org/?a=commitdiff_plain;h=d3bad7f328495d5746704f914fd335a2487ad2bb;p=chesshog.git [LIB-9] Fix error in toString() function of exceptions --- 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(); } }