mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:47:34 +00:00
Piano+LibAudio: Port to Core::File
This commit is contained in:
parent
fb8d4b7032
commit
7734eba03f
5 changed files with 61 additions and 59 deletions
|
@ -65,11 +65,9 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
return;
|
||||
DeprecatedString error;
|
||||
wav_writer.with_locked([&](auto& wav_writer) {
|
||||
wav_writer.set_file(save_path.value());
|
||||
if (wav_writer.has_error()) {
|
||||
error = DeprecatedString::formatted("Failed to export WAV file: {}", wav_writer.error_string());
|
||||
wav_writer.clear_error();
|
||||
}
|
||||
auto error_or_void = wav_writer.set_file(save_path.value());
|
||||
if (error_or_void.is_error())
|
||||
error = DeprecatedString::formatted("Failed to export WAV file: {}", error_or_void.error());
|
||||
});
|
||||
if (!error.is_empty()) {
|
||||
GUI::MessageBox::show_error(window, error);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue