summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/util/dvdrom.cpp
diff options
context:
space:
mode:
author AJR <ariedlmayer@gmail.com>2024-10-11 20:58:12 -0400
committer AJR <ariedlmayer@gmail.com>2024-10-11 21:05:51 -0400
commitbeb81e484240c450932cd95e70fdfb6559f01eb2 (patch)
tree7fe0295911a217a2cf9280bcd00357fd3addbda7 /src/lib/util/dvdrom.cpp
parenta06ca9e7226b5152f3189d8bd9ae96d3de68dcee (diff)
chd.cpp: More API changes
- Have metadata_find return std::error_condition instead of throwing an exception - Replace the is_XXX predicates with check_is_XXX methods that return a std::error_condition, enabling improved error reporting for cdrom_image_device - Retain read error information in chd_file_compressor - Make a bunch of methods noexcept This mostly restores the changes from cc772072fa635146b1df39a5694d2a8f8aa5a34f.
Diffstat (limited to 'src/lib/util/dvdrom.cpp')
-rw-r--r--src/lib/util/dvdrom.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/util/dvdrom.cpp b/src/lib/util/dvdrom.cpp
index 36dc29e7215..0b2379ef7e6 100644
--- a/src/lib/util/dvdrom.cpp
+++ b/src/lib/util/dvdrom.cpp
@@ -58,8 +58,8 @@ dvdrom_file::dvdrom_file(chd_file *_chd)
throw nullptr;
/* check it's actually a DVD-ROM */
- if (!chd->is_dvd())
- throw nullptr;
+ if (std::error_condition err = chd->check_is_dvd())
+ throw err;
sector_count = chd->unit_count();
}