forked from commanded/commanded
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include stacktrace in event handler and process manager
error
callb…
…ack functions - Include `__STACKTRACE__` in event handler failure context. - Include `__STACKTRACE__` in process manager failure context. - Log aggregate and process manager exceptions and stacktrace. - Extend aggregate lifespan to support `{:stop, reason}`.
- Loading branch information
1 parent
a4f0a02
commit 8ceab54
Showing
53 changed files
with
499 additions
and
333 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,26 @@ | ||
defmodule Commanded.Event.FailureContext do | ||
@moduledoc """ | ||
Contains the data related to an event handling failure. | ||
Data related to an event handling failure. | ||
The available fields are: | ||
- `context` - a map that is passed between each failure. Use it to store any | ||
transient state between failures. As an example it could be used to count | ||
error failures and stop or skip the problematic event after too many. | ||
- `metadata` - the metadata associated with the failed event. | ||
- `context` - a map that is passed between each failure. Use it to store any | ||
transient state between failures. As an example it could be used to count | ||
error failures and stop or skip the problematic event after too many. | ||
- `metadata` - the metadata associated with the failed event. | ||
- `stacktrace` - the stacktrace if the error was an unhandled exception. | ||
""" | ||
|
||
@type t :: %__MODULE__{ | ||
context: map(), | ||
metadata: map() | ||
metadata: map(), | ||
stacktrace: Exception.stacktrace() | nil | ||
} | ||
|
||
defstruct [ | ||
:context, | ||
:metadata | ||
:metadata, | ||
:stacktrace | ||
] | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.