Skip to content

Commit c024226

Browse files
authored
Merge branch 'main' into ref/spotlight-native
2 parents f11d041 + fe6dcac commit c024226

File tree

142 files changed

+858
-515
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+858
-515
lines changed

dart/lib/src/event_processor/enricher/io_enricher_event_processor.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ class IoEnricherEventProcessor implements EnricherEventProcessor {
100100
exception: exception,
101101
stackTrace: stackTrace,
102102
);
103+
if (_options.automatedTestMode) {
104+
rethrow;
105+
}
103106
}
104107
}
105108

dart/lib/src/event_processor/enricher/io_platform_memory.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ class PlatformMemory {
7575
}
7676
} catch (e) {
7777
options.logger(SentryLevel.warning, "Failed to run process: $e");
78+
if (options.automatedTestMode) {
79+
rethrow;
80+
}
7881
}
7982
return null;
8083
}

dart/lib/src/event_processor/exception/io_exception_event_processor.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ class IoExceptionEventProcessor implements ExceptionEventProcessor {
6969
exception: exception,
7070
stackTrace: stackTrace,
7171
);
72+
if (_options.automatedTestMode) {
73+
rethrow;
74+
}
7275
}
7376

7477
return event.copyWith(

dart/lib/src/hub.dart

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ class Hub {
124124
exception: exception,
125125
stackTrace: stackTrace,
126126
);
127+
if (_options.automatedTestMode) {
128+
rethrow;
129+
}
127130
} finally {
128131
_lastEventId = sentryId;
129132
}
@@ -183,6 +186,9 @@ class Hub {
183186
exception: exception,
184187
stackTrace: stackTrace,
185188
);
189+
if (_options.automatedTestMode) {
190+
rethrow;
191+
}
186192
} finally {
187193
_lastEventId = sentryId;
188194
}
@@ -238,6 +244,9 @@ class Hub {
238244
exception: exception,
239245
stackTrace: stackTrace,
240246
);
247+
if (_options.automatedTestMode) {
248+
rethrow;
249+
}
241250
} finally {
242251
_lastEventId = sentryId;
243252
}
@@ -271,6 +280,9 @@ class Hub {
271280
exception: exception,
272281
stackTrace: stacktrace,
273282
);
283+
if (_options.automatedTestMode) {
284+
rethrow;
285+
}
274286
}
275287
}
276288

@@ -364,6 +376,9 @@ class Hub {
364376
exception: exception,
365377
stackTrace: stackTrace,
366378
);
379+
if (_options.automatedTestMode) {
380+
rethrow;
381+
}
367382
}
368383

369384
_isEnabled = false;
@@ -565,6 +580,9 @@ class Hub {
565580
exception: exception,
566581
stackTrace: stackTrace,
567582
);
583+
if (_options.automatedTestMode) {
584+
rethrow;
585+
}
568586
}
569587
}
570588
}
@@ -602,6 +620,9 @@ class Hub {
602620
exception: exception,
603621
stackTrace: stackTrace,
604622
);
623+
if (_options.automatedTestMode) {
624+
rethrow;
625+
}
605626
}
606627
}
607628
return sentryId;
@@ -682,6 +703,9 @@ class _WeakMap {
682703
exception: exception,
683704
stackTrace: stackTrace,
684705
);
706+
if (_options.automatedTestMode) {
707+
rethrow;
708+
}
685709
}
686710
}
687711

@@ -699,6 +723,9 @@ class _WeakMap {
699723
exception: exception,
700724
stackTrace: stackTrace,
701725
);
726+
if (_options.automatedTestMode) {
727+
rethrow;
728+
}
702729
}
703730
return null;
704731
}

dart/lib/src/load_dart_debug_images_integration.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ class _LoadImageIntegrationEventProcessor implements EventProcessor {
4242
exception: e,
4343
stackTrace: stackTrace,
4444
);
45+
if (_options.automatedTestMode) {
46+
rethrow;
47+
}
4548
return event;
4649
}
4750
}

dart/lib/src/recursive_exception_cause_extractor.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ class RecursiveExceptionCauseExtractor {
4141
exception: exception,
4242
stackTrace: stackTrace,
4343
);
44+
if (_options.automatedTestMode) {
45+
rethrow;
46+
}
4447
break;
4548
}
4649
}

dart/lib/src/sentry_baggage.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ class SentryBaggage {
5555
exception: exception,
5656
stackTrace: stackTrace,
5757
);
58+
// TODO rethrow in options.automatedTestMode (currently not available here to check)
5859
}
5960
}
6061

dart/lib/src/sentry_client.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,7 @@ class SentryClient {
565565
count: spanCountBeforeEventProcessors + 1);
566566
}
567567
_options.logger(SentryLevel.debug, 'Event was dropped by a processor');
568+
break;
568569
} else if (event is SentryTransaction &&
569570
processedEvent is SentryTransaction) {
570571
// If event processor removed only some spans we still report them as dropped

dart/lib/src/sentry_envelope_item.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ class SentryEnvelopeItem {
132132
// TODO the data copy could be avoided - this would be most significant with attachments.
133133
return [...itemHeader, ...newLine, ...data];
134134
} catch (e) {
135+
// TODO rethrow in options.automatedTestMode (currently not available here to check)
135136
return [];
136137
}
137138
}

dart/lib/src/transport/http_transport.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ class HttpTransport implements Transport {
6464
return eventId != null ? SentryId.fromId(eventId) : null;
6565
} catch (e) {
6666
_options.logger(SentryLevel.error, 'Error parsing response: $e');
67+
if (_options.automatedTestMode) {
68+
rethrow;
69+
}
6770
return null;
6871
}
6972
}

0 commit comments

Comments
 (0)