From 1b106b9b5cd8d032d90124231596c907d82ddc9d Mon Sep 17 00:00:00 2001 From: Joseph Tam Date: Tue, 1 Oct 2024 20:09:51 +0800 Subject: [PATCH] refactor: remove RtmpStreamDeletedException --- .../Exceptions/RtmpStreamDeletedException.cs | 17 ----------------- .../Internal/RtmpStream.cs | 2 +- 2 files changed, 1 insertion(+), 18 deletions(-) delete mode 100644 src/LiveStreamingServerNet.Rtmp.Client/Exceptions/RtmpStreamDeletedException.cs diff --git a/src/LiveStreamingServerNet.Rtmp.Client/Exceptions/RtmpStreamDeletedException.cs b/src/LiveStreamingServerNet.Rtmp.Client/Exceptions/RtmpStreamDeletedException.cs deleted file mode 100644 index d8dd7a3a..00000000 --- a/src/LiveStreamingServerNet.Rtmp.Client/Exceptions/RtmpStreamDeletedException.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace LiveStreamingServerNet.Rtmp.Client.Exceptions -{ - public class RtmpStreamDeletedException : Exception - { - public RtmpStreamDeletedException() - { - } - - public RtmpStreamDeletedException(string? message) : base(message) - { - } - - public RtmpStreamDeletedException(string? message, Exception? innerException) : base(message, innerException) - { - } - } -} diff --git a/src/LiveStreamingServerNet.Rtmp.Client/Internal/RtmpStream.cs b/src/LiveStreamingServerNet.Rtmp.Client/Internal/RtmpStream.cs index eed15641..d890f54b 100644 --- a/src/LiveStreamingServerNet.Rtmp.Client/Internal/RtmpStream.cs +++ b/src/LiveStreamingServerNet.Rtmp.Client/Internal/RtmpStream.cs @@ -80,7 +80,7 @@ private void ValidateStreamNotDeleted() { if (_isDeleted) { - throw new RtmpStreamDeletedException(); + throw new InvalidOperationException("The stream is deleted."); } }