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: Update AwsException constructor to accept Throwable instead of Exception #2990

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

zishang520
Copy link

Overview

This PR updates the AwsException constructor to accept a Throwable instead of an Exception as the $previous parameter. This change ensures that all types of throwable errors, including Error and Exception, are properly handled and passed to the AwsException.

Changes

  • Updated the AwsException constructor to accept \Throwable for the $previous parameter.
  • Ensured compatibility with all existing error handling mechanisms in the AWS SDK.

Why this change?

Previously, the AwsException constructor only accepted Exception as the $previous parameter, which caused issues when other types of throwables, like Error, were passed. By accepting Throwable, we ensure a more robust and flexible error handling process.

Testing

  • Tested with various throwable types to confirm that the error handling behaves as expected.
  • No breaking changes observed in the current error-handling workflow.

Impact

This change enhances the SDK's error-handling capabilities without introducing breaking changes, ensuring better compatibility with a wider range of PHP error types.

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