Skip to content

Commit c49118c

Browse files
committed
also pass stacktrace
1 parent 5158fc5 commit c49118c

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

flutter/example/integration_test/integration_test.dart

+9-5
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,15 @@ void main() {
3939
testWidgets('setup sentry and capture exception', (tester) async {
4040
await setupSentryAndApp(tester);
4141

42-
final exception = SentryException(
43-
type: 'StarError', value: 'I have a bad feeling about this...');
44-
final sentryId = await Sentry.captureException(exception);
45-
46-
expect(sentryId != SentryId.empty(), true);
42+
try {
43+
throw SentryException(
44+
type: 'StarError', value: 'I have a bad feeling about this...');
45+
} catch (exception, stacktrace) {
46+
final sentryId =
47+
await Sentry.captureException(exception, stackTrace: stacktrace);
48+
49+
expect(sentryId != SentryId.empty(), true);
50+
}
4751
});
4852

4953
testWidgets('setup sentry and capture message', (tester) async {

0 commit comments

Comments
 (0)