Skip to content

Commit

Permalink
Add logging for function call failures in OBMysqlCallFunctionCallBack
Browse files Browse the repository at this point in the history
  • Loading branch information
zijiacj committed Jan 2, 2025
1 parent ac2d0a0 commit 3992a06
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@
import com.oceanbase.tools.dbbrowser.util.SqlBuilder;

import lombok.NonNull;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class OBMysqlCallFunctionCallBack implements ConnectionCallback<CallFunctionResp> {

private final DBFunction function;
Expand Down Expand Up @@ -99,6 +101,7 @@ public CallFunctionResp doInConnection(Connection con) throws SQLException, Data
throw new IllegalStateException("The return value of a function must be unique");
}
} catch (Exception e) {
log.warn("Failed to call function {}", function.getFunName(), e);
CallFunctionResp callFunctionResp = generateDefaultReturnValue();
callFunctionResp.setErrorMessage(e.getMessage());
return callFunctionResp;
Expand Down

0 comments on commit 3992a06

Please sign in to comment.