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 92c5836 Update NCCli.scala
92c5836 is described below
commit 92c5836acbff90c1d518dc5ce182a8b5be8ff35b
Author: Aaron Radzinski <[email protected]>
AuthorDate: Sat Nov 21 16:27:30 2020 -0800
Update NCCli.scala
---
.../main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala
index af3e07c..8f1534f 100644
---
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala
+++
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala
@@ -152,9 +152,10 @@ object NCCli extends App {
s"type $C'help --cmd=${cmd.name}'$RST to get help."
)
- case class MissingMandatoryJsonParameters(cmd: Command, path: String)
+ case class MissingMandatoryJsonParameters(cmd: Command, missingParams:
Seq[RestSpecParameter], path: String)
extends IllegalArgumentException(
- s"Missing mandatory JSON parameter for $C${"'" + cmd.name + s"
--path=$path'"}$RST, type $C'help --cmd=${cmd.name}'$RST to get help."
+ s"Missing mandatory JSON parameters (${missingParams.map(s ⇒
y(s.name)).mkString(",")}) " +
+ s"for $C${"'" + cmd.name + s" --path=$path'"}$RST, type $C'help
--cmd=${cmd.name}'$RST to get help."
)
case class InvalidParameter(cmd: Command, paramId: String)
@@ -2369,7 +2370,7 @@ object NCCli extends App {
}
if (mandatoryParams.nonEmpty)
- throw MissingMandatoryJsonParameters(cmd, path)
+ throw MissingMandatoryJsonParameters(cmd, mandatoryParams, path)
httpRest(cmd, path, s"{${buf.toString()}}")
}