-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #284 from scireum/fwe/event-bug-fixes
Fix two small bugs in EventRecorder
- Loading branch information
Showing
3 changed files
with
65 additions
and
3 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
20 changes: 20 additions & 0 deletions
20
src/test/java/sirius/biz/analytics/events/TestEvent3ThrowsExceptionOnSave.java
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package sirius.biz.analytics.events; | ||
|
||
import sirius.db.mixing.annotations.BeforeSave; | ||
import sirius.kernel.health.Exceptions; | ||
|
||
import java.io.UncheckedIOException; | ||
|
||
public class TestEvent3ThrowsExceptionOnSave extends Event { | ||
|
||
private final UserData user = new UserData(); | ||
|
||
public UserData getUser() { | ||
return user; | ||
} | ||
|
||
@BeforeSave | ||
public void throwErrorOnSave() { | ||
throw Exceptions.createHandled().handle(); | ||
} | ||
} |