diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-09-10 20:44:52 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-09-13 20:34:07 +0200 |
| commit | 2795ab2e05fcd27a56ddb08ecbbc6af5c3bf983a (patch) | |
| tree | dc66e7590728ace6fd2a7b0f90462f6da712e468 /src/util.cc | |
| parent | 97570ebdf7c0dc12a8218a143e2803ec7a792526 (diff) | |
Pass disk full / too many open files errors up to DoM.v1.10.26
Diffstat (limited to 'src/util.cc')
| -rw-r--r-- | src/util.cc | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/util.cc b/src/util.cc index 757553ae..11fcda27 100644 --- a/src/util.cc +++ b/src/util.cc @@ -455,3 +455,26 @@ boost::filesystem::path dcp::resources_directory () } +void +dcp::maybe_throw_from_asdcplib(Kumu::Result_t result, boost::filesystem::path path) +{ + switch (result.OsError()) { + +#ifdef LIBDCP_WINDOWS + case ERROR_DISK_FULL: + case ERROR_HANDLE_DISK_FULL: +#else + case EDQUOT: + case ENOSPC: +#endif + boost::throw_exception(DiskFullError(path)); + +#ifdef LIBDCP_WINDOWS + case ERROR_TOO_MANY_OPEN_FILES: +#else + case EMFILE: +#endif + boost::throw_exception(TooManyOpenFilesError()); + } +} + |
