diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-05-03 15:05:33 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-05-03 15:05:33 +0100 |
| commit | fe9bbdf3f5223ee94cb51ba00ddab7f4a6ddb754 (patch) | |
| tree | 1d7ff4b95d3a65989c3cb136ae338e59ca5251b1 /src/exceptions.cc | |
| parent | 9f5a1507380c52338765477da7cbe378b68870d9 (diff) | |
Use exceptions to hold errors even in the keep_going case.
Diffstat (limited to 'src/exceptions.cc')
| -rw-r--r-- | src/exceptions.cc | 22 |
1 files changed, 21 insertions, 1 deletions
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); +} |
