We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f8ab198 commit 5fb9f14Copy full SHA for 5fb9f14
dotnet/src/Client.cs
@@ -383,9 +383,23 @@ public async Task<CopilotSession> CreateSessionAsync(SessionConfig? config = nul
383
session.OnDisposed = (id) =>
384
{
385
_sessions.TryRemove(id, out _);
386
- SessionDestroyed?.Invoke(id);
+ try
387
+ {
388
+ SessionDestroyed?.Invoke(id);
389
+ }
390
+ catch (Exception ex)
391
392
+ Debug.WriteLine($"Exception in SessionDestroyed event handler: {ex}");
393
394
};
- SessionCreated?.Invoke(session);
395
396
397
+ SessionCreated?.Invoke(session);
398
399
400
401
+ Debug.WriteLine($"Exception in SessionCreated event handler: {ex}");
402
403
404
return session;
405
}
0 commit comments