Skip to content

Commit 5dec5d4

Browse files
committed
add logging last operations when there are no participants in a call after joining the call
1 parent 66e9261 commit 5dec5d4

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Packages/StreamVideo/Runtime/Core/StatefulModels/StreamCall.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,17 @@ public IStreamVideoCallParticipant GetLocalParticipant()
445445
{
446446
if (Participants.Count == 0)
447447
{
448-
Logs.Error($"{nameof(GetLocalParticipant)} - no participants in the call.");
448+
using (new StringBuilderPoolScope(out var tempSb))
449+
{
450+
tempSb.AppendLine($"{nameof(GetLocalParticipant)} - no participants in the call.");
451+
tempSb.AppendLine("Last operations leading to this state:");
452+
foreach (var log in _tempLogs.GetLogs())
453+
{
454+
tempSb.AppendLine(log);
455+
}
456+
457+
Logs.Error(tempSb.ToString());
458+
}
449459
throw new InvalidOperationException("No participants in the call.");
450460
}
451461

0 commit comments

Comments
 (0)