From 82deae62f535934bf16840427719d95d1267824a Mon Sep 17 00:00:00 2001 From: Muaz Ahmad Date: Thu, 5 Oct 2023 15:56:01 +0500 Subject: [PATCH] New error type --- src/util/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/util/mod.rs b/src/util/mod.rs index c48f2ce..7211884 100644 --- a/src/util/mod.rs +++ b/src/util/mod.rs @@ -57,7 +57,8 @@ pub struct RawMedia { // Errors pub enum GenericError { - UnknownSyncByte + UnknownSyncByte, + FLVUnknownTagType, } impl Error for GenericError {} @@ -66,6 +67,7 @@ impl fmt::Debug for GenericError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match self { GenericError::UnknownSyncByte => write!(f, "sync byte does not match any implemented input format"), + GenericError::FLVUnknownTagType => write!(f, "FLV tag does not match expected values") } } }