diff options
author | 2017-08-01 09:38:39 -0700 | |
---|---|---|
committer | 2017-08-01 09:42:56 -0700 | |
commit | 90abbf6849e467d39ac9d163b2498189c3dac164 (patch) | |
tree | d57a89f6c4b691b88ce112d2436fc910abb3d919 /tensorflow/core/kernels/fixed_length_record_reader_op.cc | |
parent | 203c3f5fd49b94888f1f727252b6bb9ad779e903 (diff) |
Use OP_REQUIRES instead of an assertion to validate op arguments
PiperOrigin-RevId: 163841759
Diffstat (limited to 'tensorflow/core/kernels/fixed_length_record_reader_op.cc')
-rw-r--r-- | tensorflow/core/kernels/fixed_length_record_reader_op.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/core/kernels/fixed_length_record_reader_op.cc b/tensorflow/core/kernels/fixed_length_record_reader_op.cc index 298a4e3678..bd2e28cefa 100644 --- a/tensorflow/core/kernels/fixed_length_record_reader_op.cc +++ b/tensorflow/core/kernels/fixed_length_record_reader_op.cc @@ -183,7 +183,7 @@ class FixedLengthRecordReaderOp : public ReaderOpKernel { errors::InvalidArgument("hop_bytes must be >= 0 not ", hop_bytes)); Env* env = context->env(); string encoding; - TF_CHECK_OK(context->GetAttr("encoding", &encoding)); + OP_REQUIRES_OK(context, context->GetAttr("encoding", &encoding)); SetReaderFactory([this, header_bytes, record_bytes, footer_bytes, hop_bytes, encoding, env]() { return new FixedLengthRecordReader(name(), header_bytes, record_bytes, |