Allow DCP reading to continue even with empty <Path> nodes in ASSETMAP.
[libdcp.git] / src / exceptions.cc
index 7516d0858577050f1f29ce82d9f57b79d715dd66..0b8978dc6528c53ff360a576e6f2048789ba3485 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2014-2018 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2014-2019 Carl Hetherington <cth@carlh.net>
 
     This file is part of libdcp.
 
@@ -129,3 +129,12 @@ MissingSubtitleImageError::MissingSubtitleImageError (string id)
 {
 
 }
+
+/** The <Path> in the ASSETMAP is empty for asset.  I can't see how this is valid,
+    but it's been seen in the wild with a DCP that claims to come from ClipsterDCI 5.10.0.5.
+ */
+EmptyAssetPathError::EmptyAssetPathError (string id)
+       : DCPReadError (String::compose("Asset map path is empty for asset %1", id))
+{
+
+}