From: <sv...@op...> - 2024-09-23 21:02:06
|
Author: manx Date: Mon Sep 23 23:01:54 2024 New Revision: 21724 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21724 Log: Merged revision(s) 21721 from trunk/OpenMPT: [Fix] openmpt123: Catch openmpt123::exception. ........ Modified: branches/OpenMPT-1.29/ (props changed) branches/OpenMPT-1.29/openmpt123/openmpt123.cpp Modified: branches/OpenMPT-1.29/openmpt123/openmpt123.cpp ============================================================================== --- branches/OpenMPT-1.29/openmpt123/openmpt123.cpp Mon Sep 23 23:01:35 2024 (r21723) +++ branches/OpenMPT-1.29/openmpt123/openmpt123.cpp Mon Sep 23 23:01:54 2024 (r21724) @@ -2348,6 +2348,10 @@ return 0; } catch ( silent_exit_exception & ) { return 0; + } catch ( exception & e ) { + std_err << MPT_USTRING("error: ") << mpt::get_exception_text<mpt::ustring>( e ) << lf; + std_err.writeout(); + return 1; } catch ( std::exception & e ) { std_err << "error: " << e.what() << std::endl; std_err.writeout(); @@ -2512,6 +2516,10 @@ #endif } catch ( silent_exit_exception & ) { return 0; + } catch ( exception & e ) { + std_err << MPT_USTRING("error: ") << mpt::get_exception_text<mpt::ustring>( e ) << lf; + std_err.writeout(); + return 1; } catch ( std::exception & e ) { std_err << "error: " << e.what() << std::endl; std_err.writeout(); |