From fe9bbdf3f5223ee94cb51ba00ddab7f4a6ddb754 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 3 May 2014 15:05:33 +0100 Subject: Use exceptions to hold errors even in the keep_going case. --- src/exceptions.cc | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'src/exceptions.cc') diff --git a/src/exceptions.cc b/src/exceptions.cc index 48da4fcd..28846e16 100644 --- a/src/exceptions.cc +++ b/src/exceptions.cc @@ -47,4 +47,24 @@ TimeFormatError::TimeFormatError (string bad_time) } - +MissingAssetError::MissingAssetError (boost::filesystem::path path, AssetType type) + : _path (path) + , _type (type) +{ + string type_name; + switch (_type) { + case MAIN_PICTURE: + type_name = " for main picture"; + break; + case MAIN_SOUND: + type_name = " for main sound"; + break; + case MAIN_SUBTITLE: + type_name = " for main subtitle"; + break; + case UNKNOWN: + break; + } + + _message = String::compose ("Missing asset %1%2", path.string(), type_name); +} -- cgit v1.2.3