This is an automated email from the ASF dual-hosted git repository.
aradzinski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
The following commit(s) were added to refs/heads/master by this push:
new 7881cfb Update NCDeployManager.scala
new ff4831b Merge branch 'master' into NLPCRAFT-446
7881cfb is described below
commit 7881cfb6c91f316f159d1d853624506f5e8f254a
Author: Aaron Radzinski <[email protected]>
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
[" +