Skip to content

Commit 245c0d3

Browse files
authored
Remove workaround for Platform.executable (#2777)
* Remove workaround for Platform.executable * add // ignore: deprecated_member_use
1 parent 63f825f commit 245c0d3

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

dart/example_web/web/main.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Future<void> main() async {
2424
Future<void> runApp() async {
2525
print('runApp');
2626

27+
// ignore: deprecated_member_use
2728
document.querySelector('#output')?.text = 'Your Dart app is running.';
2829

2930
await Sentry.addBreadcrumb(

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

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -78,21 +78,7 @@ class IoEnricherEventProcessor implements EnricherEventProcessor {
7878

7979
String? executable;
8080
if (_options.sendDefaultPii) {
81-
try {
82-
// This throws sometimes for some reason
83-
// https://github.com/flutter/flutter/issues/83921
84-
executable = Platform.executable;
85-
} catch (exception, stackTrace) {
86-
_options.logger(
87-
SentryLevel.error,
88-
'Platform.executable couldn\'t be retrieved.',
89-
exception: exception,
90-
stackTrace: stackTrace,
91-
);
92-
if (_options.automatedTestMode) {
93-
rethrow;
94-
}
95-
}
81+
executable = Platform.executable;
9682
}
9783

9884
return <String, dynamic>{

0 commit comments

Comments
 (0)