Conversation
Codecov ReportAttention: Patch coverage is
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
| namespace Aevatar.Core.Abstractions; | ||
|
|
||
| [GenerateSerializer] | ||
| public class ExceptionEvent : EventBase |
There was a problem hiding this comment.
could you add GrainType, EventType and the original Event object
| } | ||
| catch (Exception serializationEx) | ||
| { | ||
| contextDataJson = $"{{\"error\":\"Failed to serialize context data: {serializationEx.Message}\"}}"; |
There was a problem hiding this comment.
Shall we log warning here as well
There was a problem hiding this comment.
I think just printing debug logs is sufficient, as this is normal logic processing and there are no abnormal or illogical situations occurring here.
|
|
||
| // Extract class name | ||
| string? className = null; | ||
| if (!string.IsNullOrEmpty(callerClassName)) |
There was a problem hiding this comment.
let's enforce called to pass this value instead using reflection
| /// <param name="callerMemberName">Caller method name, auto-populated</param> | ||
| /// <param name="callerClassName">Caller class name, auto-populated</param> | ||
| /// <returns>If the operation succeeds, returns the operation result; if an exception occurs and is not rethrown, returns the default value</returns> | ||
| public static async Task<(T Result, Guid ExceptionId)> CatchAndPublishExceptionAsync<T>( |
There was a problem hiding this comment.
let's not using this method as it swallow the original StackTrace
There was a problem hiding this comment.
This method has certain use cases, so it is recommended to keep it.
catch and publish exception to orleans stream