Browse Source

修复生成信息,一闪而过的问题。

Felix 2 năm trước cách đây
mục cha
commit
efe2e6b03e
2 tập tin đã thay đổi với 6 bổ sung1 xóa
  1. 4 0
      ModeTypeGenerator.cs
  2. 2 1
      Program.cs

+ 4 - 0
ModeTypeGenerator.cs

@@ -142,6 +142,10 @@ namespace FlutterCodeGenerator
                         return modelType;
                     }
                 }
+                else if(type==typeof(object))
+                {
+                    throw new Exception("Object is not supported, it should be specific type.");
+                }
                 else if (type.BaseType != typeof(object))
                 {
                     _tempTypes[type] = duplicatedTime;

+ 2 - 1
Program.cs

@@ -26,8 +26,9 @@ namespace FlutterCodeGenerator
             }
             catch (Exception ex)
             {
-                Console.WriteLine($"An Error occured when generated!!! Error Message : {ex.Message}");
+                Console.WriteLine($"An Error occured when generated!!! Error Message : {ex}");
             }
+            Console.ReadLine();
         }
     }
 }