@@ -18,6 +18,7 @@ package com.google.firebase.vertexai.type
1818
1919import android.media.AudioFormat
2020import android.media.AudioTrack
21+ import android.util.Log
2122import com.google.firebase.annotations.concurrent.Background
2223import io.ktor.client.plugins.websocket.ClientWebSocketSession
2324import io.ktor.websocket.Frame
@@ -56,6 +57,7 @@ internal constructor(
5657 private var functionCallChannel: Channel <List <FunctionCallPart >> = Channel ()
5758
5859 private companion object {
60+ val TAG = LiveSession ::class .java.simpleName
5961 val MIN_BUFFER_SIZE =
6062 AudioTrack .getMinBufferSize(
6163 24000 ,
@@ -279,7 +281,9 @@ internal constructor(
279281 )
280282 )
281283 continue
282- } catch (_: Exception ) {}
284+ } catch (e: Exception ) {
285+ Log .i(TAG , " Failed to decode function calling: ${e.message} " )
286+ }
283287 try {
284288
285289 val serverContent = Json .decodeFromString<ServerContentSetup .Internal >(receivedJson)
@@ -294,7 +298,9 @@ internal constructor(
294298 emit(LiveContentResponse (data, LiveContentResponse .Status .NORMAL , null ))
295299 }
296300 }
297- } catch (_: Exception ) {}
301+ } catch (e: Exception ) {
302+ Log .i(TAG , " Failed to decode server content: ${e.message} " )
303+ }
298304 }
299305 }
300306 }
0 commit comments