Skip to content

Improved exception handling engine with new configuration options#37

Merged
kettasoft merged 32 commits into
masterfrom
feat/exception-handling
Nov 19, 2025
Merged

Improved exception handling engine with new configuration options#37
kettasoft merged 32 commits into
masterfrom
feat/exception-handling

Conversation

@kettasoft
Copy link
Copy Markdown
Owner

This pull request introduces a full redesign of the exception-handling layer in the Filterable package. The goal is to provide a more predictable, extendable, and customizable way to handle exceptions thrown during filtering

Without introducing any breaking changes.

What’s new

  • Added a dedicated exceptions configuration section.
  • Introduced a configurable exception handler class:
    • handler now accepts any class implementing
      Kettasoft\Filterable\Exceptions\Contracts\ExceptionHandlerInterface.
  • Added strict mode for enforcing exception throwing instead of skipping.
  • Centralized exception catching logic inside all engines.
  • Improved consistency between engine-level and global exception behavior.
  • Cleaner internal architecture to make custom handlers easier to implement.

New configuration


'exceptions' => [
    'handler' => Kettasoft\Filterable\Exceptions\Handlers\DefaultHandler::class,
    'strict' => env('FILTERABLE_EXCEPTION_STRICT', false),
]

Why this change

  • Previous behavior relied on scattered try/catch blocks across engines.
  • No unified way to override exception reporting or handling strategy.
  • Needed a clean hook for custom exception-based behaviors.

Notes

  • This PR contains ~31 commits of internal restructuring, but no breaking changes.
  • All existing filters continue to work as before.
  • Custom handlers can now be plugged in without touching core code.

Future potential

  • Optional exception reporters.
  • Logging toggles.
  • Per-engine override support.

@kettasoft kettasoft self-assigned this Nov 19, 2025
@kettasoft kettasoft merged commit bdbd1e9 into master Nov 19, 2025
@kettasoft kettasoft deleted the feat/exception-handling branch March 11, 2026 21:48
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