Skip to content

Commit 5bfe098

Browse files
committed
feat: add exception catch to code generator.
1 parent 07ea656 commit 5bfe098

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tools/Tensorflow.CodeGen/FunctionGenerator.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ public void AppendFunction(OpDef op, StringBuilder sb)
8383

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

86+
sb.Append("catch(NotOkStatusException ex)\n{\n");
87+
sb.AppendLine("throw ex;");
88+
sb.AppendLine("}"); // catch
89+
8690
sb.Append("catch(Exception)\n{\n");
8791
sb.AppendLine("}"); // catch
8892

0 commit comments

Comments
 (0)