Skip to content

Commit

Permalink
log more chopper output, show snackbar for player errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Chaphasilor committed Oct 16, 2024
1 parent aac06b3 commit 79771f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/services/finamp_logs_helper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class FinampLogsHelper {
var message = log.censoredMessage;
if (log.stackTrace == null) {
// Truncate long messages from chopper, but leave long stack traces
message = message.substring(0, min(1024, message.length));
message = message.substring(0, min(1024 * 5, message.length));
}
_logFileWriter!.writeln(message);
}
Expand Down
3 changes: 3 additions & 0 deletions lib/services/music_player_background_task.dart
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,14 @@ class MusicPlayerBackgroundTask extends BaseAudioHandler {
} on PlayerException catch (e) {
_audioServiceBackgroundTaskLogger
.severe("Player error code ${e.code}: ${e.message}");
GlobalSnackbar.error(e);
} on PlayerInterruptedException catch (e) {
_audioServiceBackgroundTaskLogger
.warning("Player interrupted: ${e.message}");
GlobalSnackbar.error(e);
} catch (e) {
_audioServiceBackgroundTaskLogger.severe("Player error ${e.toString()}");
GlobalSnackbar.error(e);
}
}

Expand Down

0 comments on commit 79771f5

Please sign in to comment.