Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions java/messaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ The following example demonstrates how the error handler can be used to catch me

```java
@On(service = "messaging")
private void handleError(MessagingErrorEventContext context) {
private void handleError(MessagingErrorEventContext ctx) {

String errorCode = ctx.getException().getErrorStatus().getCodeString();
if (errorCode.equals(CdsErrorStatuses.NO_ON_HANDLER.getCodeString()) ||
Expand All @@ -646,9 +646,9 @@ private void handleError(MessagingErrorEventContext context) {
// error handling for application errors

// how to access the event context of the raised exception:
// context.getException().getEventContexts().stream().findFirst().ifPresent(e -> {
// String event = e.getEvent());
// String payload = e.get("data"));
// ctx.getException().getEventContexts().stream().findFirst().ifPresent(e -> {
// String event = e.getEvent());
// String payload = e.get("data"));
// });

ctx.setResult(true); // acknowledge
Expand Down
2 changes: 1 addition & 1 deletion java/outbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ void processMyEvent(OutboxMessageEventContext context) {

// Perform processing logic for myEvent

ctx.setCompleted();
context.setCompleted();
}
```

Expand Down