Browse Source

feat: add exception catch to code generator.

tags/v0.110.0-LSTM-Model
Yaohui Liu 2 years ago
parent
commit
5bfe0982e9
No known key found for this signature in database GPG Key ID: E86D01E1809BD23E
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      tools/Tensorflow.CodeGen/FunctionGenerator.cs

+ 4
- 0
tools/Tensorflow.CodeGen/FunctionGenerator.cs View File

@@ -83,6 +83,10 @@ namespace Tensorflow.CodeGen

sb.AppendLine("}"); // try

sb.Append("catch(NotOkStatusException ex)\n{\n");
sb.AppendLine("throw ex;");
sb.AppendLine("}"); // catch

sb.Append("catch(Exception)\n{\n");
sb.AppendLine("}"); // catch



Loading…
Cancel
Save