13
0

Explicitly catch Glib::ConvertError

Local builds are not affected, since
```
ConvertError is-a Glib::Error is-a Glib::Exception
```

However it seems that rethrowing the ConvertError exception
is not handled correctly with glib/g++ of official builds:

https://discourse.ardour.org/t/crashes-on-cd-export-no-toc-or-cue-files/109771
This commit is contained in:
Robin Gareus 2024-01-15 16:49:34 +01:00
parent 37e7fe9963
commit 1b57838e90
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -672,6 +672,9 @@ ExportHandler::export_cd_marker_file (ExportTimespanPtr timespan, ExportFormatSp
} catch (std::exception& e) {
error << string_compose (_("an error occurred while writing a TOC/CUE file: %1"), e.what()) << endmsg;
::g_unlink (filepath.c_str());
} catch (Glib::ConvertError const& e) {
error << string_compose (_("an error occurred while writing a TOC/CUE file: %1"), e.what()) << endmsg;
::g_unlink (filepath.c_str());
} catch (Glib::Exception& e) {
error << string_compose (_("an error occurred while writing a TOC/CUE file: %1"), e.what()) << endmsg;
::g_unlink (filepath.c_str());