From: <sv...@op...> - 2024-09-23 21:01:27
|
Author: manx Date: Mon Sep 23 23:01:15 2024 New Revision: 21722 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21722 Log: Merged revision(s) 21721 from trunk/OpenMPT: [Fix] openmpt123: Catch openmpt123::exception. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/openmpt123/openmpt123.cpp Modified: branches/OpenMPT-1.31/openmpt123/openmpt123.cpp ============================================================================== --- branches/OpenMPT-1.31/openmpt123/openmpt123.cpp Mon Sep 23 23:00:43 2024 (r21721) +++ branches/OpenMPT-1.31/openmpt123/openmpt123.cpp Mon Sep 23 23:01:15 2024 (r21722) @@ -2301,6 +2301,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 << MPT_USTRING("error: ") << mpt::get_exception_text<mpt::ustring>( e ) << lf; std_err.writeout(); @@ -2468,6 +2472,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 << MPT_USTRING("error: ") << mpt::get_exception_text<mpt::ustring>( e ) << lf; std_err.writeout(); |