Skip to content

Commit

Permalink
Exception update
Browse files Browse the repository at this point in the history
  • Loading branch information
metalgearsloth committed Nov 20, 2023
1 parent ad42067 commit f0af45e
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions Robust.Shared/GameObjects/RobustMemoryManager.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
using System;
using System.IO;
using Microsoft.IO;
using Robust.Shared.IoC;
using Robust.Shared.Log;
using Robust.Shared.Utility;
using SixLabors.ImageSharp.Memory;

namespace Robust.Shared.GameObjects;

Expand All @@ -23,13 +21,13 @@ internal sealed class RobustMemoryManager
public RobustMemoryManager()
{
MemStreamManager.StreamDoubleDisposed += (sender, args) =>
throw new InvalidMemoryOperationException("Found double disposed stream.");
throw new InvalidOperationException("Found double disposed stream.");

MemStreamManager.StreamFinalized += (sender, args) =>
throw new InvalidMemoryOperationException("Stream finalized but not disposed indicating a leak");
throw new InvalidOperationException("Stream finalized but not disposed indicating a leak");

MemStreamManager.StreamOverCapacity += (sender, args) =>
throw new InvalidMemoryOperationException("Stream over memory capacity");
throw new InvalidOperationException("Stream over memory capacity");
}

public static MemoryStream GetMemoryStream()
Expand Down

0 comments on commit f0af45e

Please sign in to comment.