You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nlpcraft.apache.org by ar...@apache.org on 2020/09/13 07:15:38 UTC

[incubator-nlpcraft] branch NLPCRAFT-41 updated: Fix.

This is an automated email from the ASF dual-hosted git repository.

aradzinski pushed a commit to branch NLPCRAFT-41
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git


The following commit(s) were added to refs/heads/NLPCRAFT-41 by this push:
     new 43f7a0f  Fix.
43f7a0f is described below

commit 43f7a0f43a4c210387f4860d9da509c77580fecd
Author: Aaron Radzinski <ar...@datalingvo.com>
AuthorDate: Sun Sep 13 00:15:28 2020 -0700

    Fix.
---
 .../scala/org/apache/nlpcraft/common/util/NCUtils.scala    | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/util/NCUtils.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/util/NCUtils.scala
index 8a30b2d..ff045ad 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/util/NCUtils.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/util/NCUtils.scala
@@ -1341,13 +1341,17 @@ object NCUtils extends LazyLogging {
         while (x != null) {
             var first = true
 
-            x.getLocalizedMessage.split("\n").foreach(line ⇒ {
-                logger.error(s"${" " * indent}${if (first) "+-" else "  "}${line.trim}")
+            val msg = x.getLocalizedMessage
 
-                first = false
-            })
+            if (msg != null) {
+                x.getLocalizedMessage.split("\n").foreach(line ⇒ {
+                    logger.error(s"${" " * indent}${if (first) "+-" else "  "}${line.trim}")
+
+                    first = false
+                })
 
-            indent += INDENT
+                indent += INDENT
+            }
 
             x = x.getCause
         }