Skip to content

Commit

Permalink
revert change to the exception info
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim8y committed Jun 7, 2024
1 parent 612497a commit 512d738
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/Plugins/ApplicationLogs/Store/LogStorageStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,9 @@ public Guid PutStackItemState(StackItem stackItem)
{
_snapshot.Put(key, BinarySerializer.Serialize(stackItem, ExecutionEngineLimits.Default with { MaxItemSize = (uint)Settings.Default.MaxStackSize }));
}
catch (Exception ex)
catch
{
var detailedException = ex.Message;
if (detailedException.Length > 1024)
detailedException = string.Concat(detailedException.AsSpan(0, 1021), "...");
ByteString exceptionRecord = new(Encoding.UTF8.GetBytes(detailedException));
_snapshot.Put(key, BinarySerializer.Serialize(exceptionRecord, ExecutionEngineLimits.Default with { MaxItemSize = (uint)Settings.Default.MaxStackSize }));
_snapshot.Put(key, BinarySerializer.Serialize(StackItem.Null, ExecutionEngineLimits.Default with { MaxItemSize = (uint)Settings.Default.MaxStackSize }));
}
return id;
}
Expand Down

0 comments on commit 512d738

Please sign in to comment.