Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: samber/oops
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
Loading
...
head repository: MathGaps/oops
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on Aug 4, 2025

  1. fix: improve OopsError.Is() method to properly handle error comparisons

    This commit improves the Is() method to correctly handle error comparisons
    without causing panics. The key improvements are:
    1. Compare underlying errors when both OopsError instances have them
    2. Only compare messages when neither has underlying errors
    3. Handle mixed cases (one with underlying error, one without) correctly
    4. Add proper recursive error chain traversal via errors.Is()
    5. Remove redundant checks and simplify comparison logic
    6. Add comprehensive test coverage for all comparison scenarios
    The fix ensures that:
    - errors.Is(wrappedErr, originalErr) works correctly for wrapped oops errors
    - Multiple levels of wrapping are handled properly
    - Different error instances with same messages are correctly distinguished
    - Standard error comparisons work as expected
    - No panics occur during error comparisons
    All existing tests pass, ensuring backward compatibility.
    shubham030 committed Aug 4, 2025
    Configuration menu
    Copy the full SHA
    bf6740f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f3ce9be View commit details
    Browse the repository at this point in the history
Loading

AltStyle によって変換されたページ (->オリジナル) /