liubao68 commented on a change in pull request #743: [SCB-601] when 
java.lang.Error: not support def type: class io.swagger.models.ComposedMode we 
don't know which swagger
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/743#discussion_r192074576
 
 

 ##########
 File path: 
core/src/main/java/org/apache/servicecomb/core/definition/SchemaMeta.java
 ##########
 @@ -57,21 +57,26 @@
   private SwaggerToClassGenerator swaggerToClassGenerator;
 
   public SchemaMeta(Swagger swagger, MicroserviceMeta microserviceMeta, String 
schemaId) {
-    this.packageName = SchemaUtils.generatePackageName(microserviceMeta, 
schemaId);
+    try {
+      this.packageName = SchemaUtils.generatePackageName(microserviceMeta, 
schemaId);
 
-    this.swagger = swagger;
-    this.name = schemaId;
+      this.swagger = swagger;
+      this.name = schemaId;
 
-    this.microserviceMeta = microserviceMeta;
-    this.microserviceQualifiedName = microserviceMeta.getName() + "." + 
schemaId;
+      this.microserviceMeta = microserviceMeta;
+      this.microserviceQualifiedName = microserviceMeta.getName() + "." + 
schemaId;
 
-    swaggerToClassGenerator = new 
SwaggerToClassGenerator(microserviceMeta.getClassLoader(), swagger, 
packageName);
-    swaggerIntf = swaggerToClassGenerator.convert();
+      swaggerToClassGenerator = new 
SwaggerToClassGenerator(microserviceMeta.getClassLoader(), swagger, 
packageName);
+      swaggerIntf = swaggerToClassGenerator.convert();
 
-    createOperationMgr("schemaMeta " + schemaId + " operation mgr");
-    operationMgr.setRegisterErrorFmt("Operation name repeat, schema=%s, 
operation=%s");
+      createOperationMgr("schemaMeta " + schemaId + " operation mgr");
+      operationMgr.setRegisterErrorFmt("Operation name repeat, schema=%s, 
operation=%s");
 
-    initOperations();
+      initOperations();
+    } catch (Throwable e) {
 
 Review comment:
   This will be logger in main thread or by user code. Here do not need, or 
will print twice

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to