File tree Expand file tree Collapse file tree 2 files changed +18
-22
lines changed
flutter/example/android/app/src/main/kotlin/io/sentry/samples/flutter Expand file tree Collapse file tree 2 files changed +18
-22
lines changed Original file line number Diff line number Diff line change @@ -200,6 +200,6 @@ jobs:
200
200
steps :
201
201
- uses : actions/checkout@v4
202
202
# To recreate baseline run: detekt -i flutter/android,flutter/example/android -b flutter/config/detekt-bl.xml -cb
203
- - uses : natiginfo/action-detekt-all@e01de6ff0eef7c24131e8a133bf598cfac6ceeab # pin@1.21.0
203
+ - uses : natiginfo/action-detekt-all@be3c18799c7c392b2f41a674beed9ced7ae2f21b # pin@1.23.1
204
204
with :
205
205
args : -i flutter/android,flutter/example/android --baseline flutter/config/detekt-bl.xml --jvm-target 1.8 --build-upon-default-config --all-rules
Original file line number Diff line number Diff line change @@ -11,37 +11,33 @@ class MainActivity : FlutterActivity() {
11
11
12
12
override fun configureFlutterEngine (flutterEngine : FlutterEngine ) {
13
13
super .configureFlutterEngine(flutterEngine)
14
- MethodChannel (flutterEngine.dartExecutor.binaryMessenger, _channel ).setMethodCallHandler {
15
- call, result ->
14
+ MethodChannel (
15
+ flutterEngine.dartExecutor.binaryMessenger,
16
+ _channel ,
17
+ ).setMethodCallHandler { call, result ->
16
18
// Note: this method is invoked on the main thread.
17
19
when (call.method) {
18
- " throw" -> {
20
+ " throw" ->
19
21
thread(isDaemon = true ) {
20
22
throw Exception (" Catch this java exception thrown from Kotlin thread!" )
21
23
}
22
- }
23
- " anr" -> {
24
- Thread .sleep(6_000 )
25
- }
26
- " capture" -> {
24
+
25
+ " anr" -> Thread .sleep(6_000 )
26
+
27
+ " capture" ->
27
28
try {
28
29
throw RuntimeException (" Catch this java exception!" )
29
30
} catch (e: Exception ) {
30
31
Sentry .captureException(e)
31
32
}
32
- }
33
- " crash" -> {
34
- crash()
35
- }
36
- " cpp_capture_message" -> {
37
- message()
38
- }
39
- " platform_exception" -> {
40
- throw RuntimeException (" Catch this platform exception!" )
41
- }
42
- else -> {
43
- result.notImplemented()
44
- }
33
+
34
+ " crash" -> crash()
35
+
36
+ " cpp_capture_message" -> message()
37
+
38
+ " platform_exception" -> throw RuntimeException (" Catch this platform exception!" )
39
+
40
+ else -> result.notImplemented()
45
41
}
46
42
result.success(" " )
47
43
}
You can’t perform that action at this time.
0 commit comments