Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: re-throw error in onBeforeOk for proper error handling #3407

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

oljc
Copy link
Member

@oljc oljc commented Jan 3, 2025

Types of changes

  • New feature
  • Bug fix
  • Enhancement
  • Component style change
  • Typescript definition change
  • Documentation change
  • Coding style change
  • Refactoring
  • Test cases
  • Continuous integration
  • Breaking change
  • Others

Background and context

在之前的实现中,onBeforeOk 抛出的错误会被捕获但未重新抛出,导致调用方无法感知错误没有正常传播,可能造成业务逻辑异常

Solution

How is the change tested?

Changelog

Component Changelog(CN) Changelog(EN) Related issues
Modal 修复执行 onBeforeOk 时错误未传播的问题 fix re-throw error in onBeforeOk for proper error handling
Drawer 修复执行 onBeforeOk 时错误未传播的问题 fix re-throw error in onBeforeOk for proper error handling
Popconfirm 修复执行 onBeforeOk 时错误未传播的问题 fix re-throw error in onBeforeOk for proper error handling

Checklist:

  • Test suite passes (npm run test)
  • Provide changelog for relevant changes (e.g. bug fixes and new features) if applicable.
  • Changes are submitted to the appropriate branch (e.g. features should be submitted to feature branch and others
    should be submitted to main branch)

Other information

Copy link

codesandbox bot commented Jan 3, 2025

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@oljc oljc merged commit 04fd194 into arco-design:main Jan 6, 2025
2 of 4 checks passed
@oljc oljc deleted the fix-re-throw branch January 6, 2025 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant