Skip to content

Refactor error handling to use \Throwable instead of Exception and Error#3347

Merged
Mips2648 merged 4 commits into
developfrom
refacto/use-throwable-in-catch
May 18, 2026
Merged

Refactor error handling to use \Throwable instead of Exception and Error#3347
Mips2648 merged 4 commits into
developfrom
refacto/use-throwable-in-catch

Conversation

@Mips2648
Copy link
Copy Markdown
Collaborator

Description

This pull request standardizes exception handling across the codebase by replacing all instances of separate catch (Exception $e) and catch (Error $e) blocks with a single catch (\Throwable $e) block.
This change ensures that all types of errors and exceptions are caught in a unified way, improving error handling consistency and reducing code duplication.

Additionally, there are minor code formatting improvements for better readability.

These changes improve the maintainability and reliability of the code by ensuring all errors are handled consistently and the code is easier to read and update.

Suggested changelog entry

n/a

Related issues/external references

Fixes #

Types of changes

  • Code quality
  • Bug fix (non-breaking change which fixes)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
    • This change is only breaking for integrators, not for external standards or end-users.
  • Documentation improvement

PR checklist

@Mips2648 Mips2648 added the changelog-other Use to generate release notes label May 14, 2026
@Mips2648 Mips2648 added this to the 4.6 milestone May 14, 2026
@Mips2648 Mips2648 requested review from Salvialf and zoic21 May 14, 2026 06:10
@Mips2648 Mips2648 requested a review from Sekiro-kost May 18, 2026 07:25
@Mips2648 Mips2648 merged commit 72d48f1 into develop May 18, 2026
9 checks passed
@Mips2648 Mips2648 deleted the refacto/use-throwable-in-catch branch May 18, 2026 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-other Use to generate release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants