This is an automated email from the ASF dual-hosted git repository.
sergeykamov pushed a commit to branch NLPCRAFT-434
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
The following commit(s) were added to refs/heads/NLPCRAFT-434 by this push:
new a678944 WIP.
a678944 is described below
commit a678944c7d401f72b8553f55f84e733dd117a45f
Author: Sergey Kamov <[email protected]>
AuthorDate: Thu Sep 9 23:41:35 2021 +0300
WIP.
---
.../org/apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
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 574ade2..de45a18 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
@@ -1700,7 +1700,13 @@ object NCDeployManager extends NCService {
addClass(claxx.getAnnotationsByType(CLS_ELEM_DEF_CLASS))
getAllMethods(claxx).foreach(m =>
addClass(m.getAnnotationsByType(CLS_ELEM_DEF_CLASS)))
- allClassDefAnns.foreach(cl => elems +=
cl.value().getDeclaredConstructor().newInstance().asInstanceOf[NCElement])
+ allClassDefAnns.foreach(cl =>
+ try
+ elems +=
cl.value().getDeclaredConstructor().newInstance().asInstanceOf[NCElement]
+ catch {
+ case e: Exception => throw new NCE(s"Failed to
instantiate element for: ${cl.value()}", e)
+ }
+ )
})
}