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 2021/09/15 20:30:17 UTC
[incubator-nlpcraft] branch NLPCRAFT-446 updated: Update
NCDeployManager.scala
This is an automated email from the ASF dual-hosted git repository.
aradzinski pushed a commit to branch NLPCRAFT-446
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
The following commit(s) were added to refs/heads/NLPCRAFT-446 by this push:
new 7881cfb Update NCDeployManager.scala
7881cfb is described below
commit 7881cfb6c91f316f159d1d853624506f5e8f254a
Author: Aaron Radzinski <ar...@datalingvo.com>
AuthorDate: Wed Sep 15 13:30:09 2021 -0700
Update NCDeployManager.scala
---
.../nlpcraft/probe/mgrs/deploy/NCDeployManager.scala | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala
index d92a2d7..c0477f0 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala
@@ -1264,11 +1264,18 @@ object NCDeployManager extends NCService {
case 1 => termAnns.head.asInstanceOf[NCIntentTerm].value()
case 0 =>
- throw new NCE(s"Missing @NCIntentTerm annotation for [" +
- s"mdlId=$mdlId, " +
- s"intentId=${intent.id}, " +
- s"arg=${mkArg()}" +
- s"]")
+ if (idx == 0)
+ throw new NCE(s"Missing @NCIntentTerm annotation or wrong type of the 1st parameter (must be 'NCIntentMatch') for [" +
+ s"mdlId=$mdlId, " +
+ s"intentId=${intent.id}, " +
+ s"arg=${mkArg()}" +
+ s"]")
+ else
+ throw new NCE(s"Missing @NCIntentTerm annotation for [" +
+ s"mdlId=$mdlId, " +
+ s"intentId=${intent.id}, " +
+ s"arg=${mkArg()}" +
+ s"]")
case _ =>
throw new NCE(s"Too many @NCIntentTerm annotations for [" +