Raise a exception to abort the process when called. If exit_without_error is true, the process will exit normally, otherwise it will exit with a SIGABORT signal. Returns nothing but an exception. Returns the created operation.
(scope *Scope, optional ...AbortAttr)
| 37595 | // |
| 37596 | // Returns the created operation. |
| 37597 | func Abort(scope *Scope, optional ...AbortAttr) (o *tf.Operation) { |
| 37598 | if scope.Err() != nil { |
| 37599 | return |
| 37600 | } |
| 37601 | attrs := map[string]interface{}{} |
| 37602 | for _, a := range optional { |
| 37603 | a(attrs) |
| 37604 | } |
| 37605 | opspec := tf.OpSpec{ |
| 37606 | Type: "Abort", |
| 37607 | |
| 37608 | Attrs: attrs, |
| 37609 | } |
| 37610 | return scope.AddOperation(opspec) |
| 37611 | } |
| 37612 | |
| 37613 | // DecodePngAttr is an optional argument to DecodePng. |
| 37614 | type DecodePngAttr func(optionalAttr) |
no test coverage detected