Skip to content

Commit

Permalink
Port an upstream patch: Do not generate logs for Velox user errors (#405
Browse files Browse the repository at this point in the history
)
  • Loading branch information
PHILO-HE authored Sep 20, 2023
1 parent 175870d commit 1910a17
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions velox/common/base/Exceptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,13 @@ template <typename Exception, typename StringType>
static_assert(
!std::is_same_v<StringType, std::string>,
"BUG: we should not pass std::string by value to veloxCheckFail");
LOG(ERROR) << "Line: " << args.file << ":" << args.line
<< ", Function:" << args.function
<< ", Expression: " << args.expression << " " << s
<< ", Source: " << args.errorSource
<< ", ErrorCode: " << args.errorCode;
if constexpr (!std::is_same_v<Exception, VeloxUserError>) {
LOG(ERROR) << "Line: " << args.file << ":" << args.line
<< ", Function:" << args.function
<< ", Expression: " << args.expression << " " << s
<< ", Source: " << args.errorSource
<< ", ErrorCode: " << args.errorCode;
}

throw Exception(
args.file,
Expand Down

0 comments on commit 1910a17

Please sign in to comment.