Skip to content

Commit 49c754f

Browse files
committed
fix: fix error handling within ThingDiscovery class
1 parent 26921a7 commit 49c754f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/src/core/implementation/thing_discovery.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -485,11 +485,11 @@ class ThingDiscoveryProcess extends Stream<ThingDescription>
485485
}) {
486486
final streamSubscription = _thingDescriptionStream.listen(
487487
onData,
488-
onError: (error, stackTrace) {
488+
onError: (error) {
489489
if (error is Exception) {
490490
_error = error;
491491
// ignore: avoid_dynamic_calls
492-
onError?.call(error, stackTrace);
492+
onError?.call(error);
493493
}
494494
},
495495
onDone: () {

test/core/discovery_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ void main() {
352352
(event) {
353353
counter++;
354354
},
355-
onError: (error, stackTrace) async {},
355+
onError: (error) async {},
356356
onDone: () {
357357
expect(counter, 0);
358358
expect(thingDiscoveryProcess.done, true);

0 commit comments

Comments
 (0)