Skip to content

Commit

Permalink
Add a log to get info when an error occurred when recording / playing…
Browse files Browse the repository at this point in the history
… voice message

Will help debugging issues like #3904
  • Loading branch information
bmarty committed Oct 5, 2021
1 parent f91936b commit 06fcee3
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class VoiceMessageHelper @Inject constructor(
try {
voiceRecorder.startRecord()
} catch (failure: Throwable) {
Timber.e(failure, "Unable to start recording")
throw VoiceFailure.UnableToRecord(failure)
}
startRecordingAmplitudes()
Expand Down Expand Up @@ -146,6 +147,7 @@ class VoiceMessageHelper @Inject constructor(
}
}
} catch (failure: Throwable) {
Timber.e(failure, "Unable to start playback")
throw VoiceFailure.UnableToPlay(failure)
}
startPlaybackTicker(id)
Expand Down

0 comments on commit 06fcee3

Please sign in to comment.