Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Event Projector Laravel Package

spatie/laravel-event-projector

Deprecated in favor of spatie/laravel-event-sourcing. Entry-level event sourcing toolkit for Laravel: define aggregates, projectors, and reactors; persist domain events, build read models, and react to events for auditing and reporting-friendly apps.

View on GitHub
Deep Wiki
Context7

title: Handling exceptions weight: 4

The event-projector config file has a key, catch_exceptions, that determines what will happen should a projector or reactor throw an exception. If this setting is set to false, exceptions will not be caught and your app will come to a grinding halt.

If catch_exceptions is set to true, and an projector or reactor throws an exception, all other projectors and reactors will still get called. The Projectionist will catch all exceptions and fire the EventHandlerFailedHandlingEvent. That event contains these public properties:

  • eventHandler: The projector or reactor that could not handle the event.
  • storedEvent: The instance of Spatie\EventProjector\Models\StoredEvent that could not be handled.
  • exception: The exception thrown by the EventHandler.

It will also call the handleException method on the projector or reactor that threw the exception. It will receive the thrown error as the first argument. If you throw an exception in handleException, the Projectionist will not catch it and your php process will fail.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport