提交 8ec3d863 编写于 作者: M minqiyang

Fix throw_on_error direct call bug

test=develop
上级 52b4821a
......@@ -84,7 +84,9 @@ class ProtoEncodeHelper {
~ProtoEncodeHelper() {
#define REPLACE_ENFORCE_GLOG 1
// Make sure callers didn't do operations that went over max_size promised
paddle::platform::throw_on_error(p_ <= limit_);
if (paddle::platform::is_error(p_ <= limit_)) {
paddle::platform::throw_on_error(p_ <= limit_);
}
#undef REPLACE_ENFORCE_GLOG
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册