Skip to content

Commit

Permalink
fix(audioplayers_platform_interface): handle platform exception via l…
Browse files Browse the repository at this point in the history
…ogger (#1254)

Fixes #1253

Co-authored-by: Gustl22 <[email protected]>
  • Loading branch information
larssn and Gustl22 authored Sep 2, 2022
1 parent 3946bcc commit 56df6ed
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class MethodChannelAudioplayersPlatform extends AudioplayersPlatform
}
}

Future<void> _doHandlePlatformCall(MethodCall call) async {
void _doHandlePlatformCall(MethodCall call) {
final playerId = call.getString('playerId');

switch (call.method) {
Expand All @@ -173,7 +173,8 @@ class MethodChannelAudioplayersPlatform extends AudioplayersPlatform
emitSeekComplete(playerId);
break;
case 'audio.onError':
throw call.getString('value');
_logger.error('Unexpected platform error: ${call.getString('value')}');
break;
default:
_logger.error('Unknown method ${call.method} ');
}
Expand Down

0 comments on commit 56df6ed

Please sign in to comment.