zclllyybb commented on code in PR #53041:
URL: https://github.com/apache/doris/pull/53041#discussion_r2196963087
##########
be/src/vec/functions/function.h:
##########
@@ -196,8 +196,13 @@ class IFunctionBase {
try {
return prepare(context, block, arguments, result)
->execute(context, block, arguments, result,
input_rows_count, dry_run);
- } catch (const Exception& e) {
- return e.to_status();
+ } catch (const std::exception& e) {
+ if (const auto* doris_e = dynamic_cast<const
doris::Exception*>(&e)) {
+ return doris_e->to_status();
+ } else {
+ return Status::InternalError("Function {} execute failed: {}",
get_name(),
Review Comment:
这个地方是不对的,以前`e.to_status()`可以把code保存下来,你这样搞比如InvalidArgument之类的都变成InternalError了
##########
be/src/vec/functions/function.h:
##########
@@ -196,8 +196,13 @@ class IFunctionBase {
try {
return prepare(context, block, arguments, result)
->execute(context, block, arguments, result,
input_rows_count, dry_run);
- } catch (const Exception& e) {
- return e.to_status();
+ } catch (const std::exception& e) {
+ if (const auto* doris_e = dynamic_cast<const
doris::Exception*>(&e)) {
+ return doris_e->to_status();
+ } else {
+ return Status::InternalError("Function {} execute failed: {}",
get_name(),
Review Comment:
这个地方是不对的,以前`e.to_status()`可以把code保存下来,你这样搞比如InvalidArgument之类的都变成InternalError了
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]