-
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.
feat: [RELEASE] improved InvalidTransition error to include aggregate_id
- Loading branch information
1 parent
c21786d
commit 7262e41
Showing
5 changed files
with
21 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
module Eventsimple | ||
class InvalidTransition < StandardError | ||
attr_reader :klass | ||
attr_reader :klass, :aggregate_id | ||
|
||
def initialize(klass = nil) | ||
def initialize(klass = nil, aggregate_id = nil) | ||
@klass = klass | ||
super | ||
@aggregate_id = aggregate_id | ||
super(klass) | ||
end | ||
|
||
def to_s | ||
"Invalid State Transition for #{klass}" | ||
"Invalid State Transition for #{klass} on aggregate_id: #{aggregate_id}" | ||
end | ||
end | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
module Eventsimple | ||
VERSION = '1.3.2' | ||
VERSION = '1.4.0' | ||
end |