Avoid crashing the app in the worst case.
@@ -35,7 +35,7 @@ class MediaCollectionViewCell: BaseCollectionViewCell {
} else if let genre = media as? VLCMLGenre {
update(genre: genre)
} else {
- fatalError("needs to be of Type VLCMLMedia or VLCMLAlbum")
+ assertionFailure("MovieCollectionViewCell: media: Needs to be of a supported Type.")
}
@@ -35,7 +35,7 @@ class MovieCollectionViewCell: BaseCollectionViewCell {
} else if let playlist = media as? VLCMLPlaylist {
update(playlist:playlist)
- fatalError("wrong object")
@@ -38,7 +38,7 @@ class MediaEditCell: BaseCollectionViewCell {
} else if let audio = media as? VLCMLMedia, audio.type() == .audio {
updateForAudio(audio: audio)
- fatalError("needs to be of a supported Type")
+ assertionFailure("MediaEditCell: media: Needs to be of a supported Type.")