From cf3c40fbe015d0f6f62bd82e928823b05237c272 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bence=20Sg=C3=A1netz?= Date: Fri, 21 Oct 2022 22:15:55 +0200 Subject: [PATCH] Missing files from previous commit --- Cavern.Format/Common/KeyLengthValue.cs | 2 ++ Cavern.Format/Common/_Exceptions.cs | 12 ++++++++++++ Cavern.Format/Container/Matroska/Block.cs | 1 + 3 files changed, 15 insertions(+) diff --git a/Cavern.Format/Common/KeyLengthValue.cs b/Cavern.Format/Common/KeyLengthValue.cs index b3537df8..bcf4e71b 100644 --- a/Cavern.Format/Common/KeyLengthValue.cs +++ b/Cavern.Format/Common/KeyLengthValue.cs @@ -2,6 +2,8 @@ using System.IO; using System.Text; +using Cavern.Format.Utilities; + namespace Cavern.Format.Common { /// /// A tag and its data encoded in the format of a key, a length, and a value, most notably used in the EBML format. diff --git a/Cavern.Format/Common/_Exceptions.cs b/Cavern.Format/Common/_Exceptions.cs index 8b638f02..f3abd766 100644 --- a/Cavern.Format/Common/_Exceptions.cs +++ b/Cavern.Format/Common/_Exceptions.cs @@ -37,6 +37,18 @@ public class DecoderException : Exception { public DecoderException(int errorCode) : base(string.Format(message, errorCode)) { } } + /// + /// Tells that no program was detected in the container/track. + /// + public class NoProgramException : Exception { + const string message = "No program was detected."; + + /// + /// Tells that no program was detected in the container/track. + /// + public NoProgramException() : base(message) { } + } + /// /// Tells that a decoder which can process an infinite stream is not able to return content length. /// diff --git a/Cavern.Format/Container/Matroska/Block.cs b/Cavern.Format/Container/Matroska/Block.cs index c8b2df4f..fe4fef35 100644 --- a/Cavern.Format/Container/Matroska/Block.cs +++ b/Cavern.Format/Container/Matroska/Block.cs @@ -1,6 +1,7 @@ using System.IO; using Cavern.Format.Common; +using Cavern.Format.Utilities; using Cavern.Utilities; namespace Cavern.Format.Container.Matroska {