From: <sv...@op...> - 2024-09-23 21:01:43
|
Author: manx Date: Mon Sep 23 23:01:35 2024 New Revision: 21723 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21723 Log: Merged revision(s) 21721 from trunk/OpenMPT: [Fix] openmpt123: Catch openmpt123::exception. ........ Modified: branches/OpenMPT-1.30/ (props changed) branches/OpenMPT-1.30/openmpt123/openmpt123.cpp Modified: branches/OpenMPT-1.30/openmpt123/openmpt123.cpp ============================================================================== --- branches/OpenMPT-1.30/openmpt123/openmpt123.cpp Mon Sep 23 23:01:15 2024 (r21722) +++ branches/OpenMPT-1.30/openmpt123/openmpt123.cpp Mon Sep 23 23:01:35 2024 (r21723) @@ -2358,6 +2358,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(); @@ -2522,6 +2526,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(); |