Merge pull request #4165 from vector-im/feature/bma/log_error

Add a log to get info when an error occurred when recording / playing voice message
This commit is contained in:
Benoit Marty 2021-10-05 13:38:11 +02:00 committed by GitHub
commit 9fd1cc9c8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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()
@ -146,6 +147,7 @@ class VoiceMessageHelper @Inject constructor(
}
}
} catch (failure: Throwable) {
Timber.e(failure, "Unable to start playback")
throw VoiceFailure.UnableToPlay(failure)
}
startPlaybackTicker(id)