New error type
This commit is contained in:
parent
3aa8cba150
commit
82deae62f5
1 changed files with 3 additions and 1 deletions
|
@ -57,7 +57,8 @@ pub struct RawMedia {
|
||||||
// Errors
|
// Errors
|
||||||
|
|
||||||
pub enum GenericError {
|
pub enum GenericError {
|
||||||
UnknownSyncByte
|
UnknownSyncByte,
|
||||||
|
FLVUnknownTagType,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Error for GenericError {}
|
impl Error for GenericError {}
|
||||||
|
@ -66,6 +67,7 @@ impl fmt::Debug for GenericError {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
match self {
|
match self {
|
||||||
GenericError::UnknownSyncByte => write!(f, "sync byte does not match any implemented input format"),
|
GenericError::UnknownSyncByte => write!(f, "sync byte does not match any implemented input format"),
|
||||||
|
GenericError::FLVUnknownTagType => write!(f, "FLV tag does not match expected values")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue