Skip to content

Commit 7833bab

Browse files
committed
fix formatting
1 parent 71c58b0 commit 7833bab

File tree

2 files changed

+23
-19
lines changed
  • platform-includes

2 files changed

+23
-19
lines changed

platform-includes/set-fingerprint/rpc/dart.mdx

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,19 @@ class MyRpcException implements Exception {
66
MyRpcException(this.function, this.httpStatusCode);
77
}
88
9-
await Sentry.init((options) {
10-
options.beforeSend = (event, hint) {
11-
if (event.throwable is MyRpcException) {
12-
final exception = event.throwable as MyRpcException;
13-
event = event.copyWith(fingerprint: [
14-
'{{ default }}',
15-
exception.function,
16-
exception.httpStatusCode.toString(),
17-
]);
18-
}
19-
return event;
20-
};
21-
};
9+
await Sentry.init(
10+
(options) {
11+
options.beforeSend = (event, hint) {
12+
if (event.throwable is MyRpcException) {
13+
final exception = event.throwable as MyRpcException;
14+
event = event.copyWith(fingerprint: [
15+
'{{ default }}',
16+
exception.function,
17+
exception.httpStatusCode.toString(),
18+
]);
19+
}
20+
return event;
21+
};
22+
},
23+
);
2224
```

platform-includes/user-feedback/sdk-api-example/dart.mdx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
// Option 1: Retrieving SentryId from beforeSend
33
SentryId sentryId = SentryId.empty();
44
5-
await Sentry.init((options) {
6-
options.beforeSend = (event, hint) {
7-
sentryId = event.eventId;
8-
return event;
9-
};
10-
});
5+
await Sentry.init(
6+
(options) {
7+
options.beforeSend = (event, hint) {
8+
sentryId = event.eventId;
9+
return event;
10+
};
11+
},
12+
);
1113
1214
// Option 2: Retrieving SentryId from the method capturing the event
1315
SentryId sentryId = Sentry.captureMessage("My message");

0 commit comments

Comments
 (0)