13
0

Print reversible command debug output

Debug builds will assert, the PBD::warning will not
be readable anywhere after that, so long it to stderr.
This commit is contained in:
Robin Gareus 2022-11-02 00:47:09 +01:00
parent 292cff7cfc
commit c84073e5cf
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -3288,7 +3288,11 @@ void
Session::begin_reversible_command (GQuark q)
{
if (_current_trans) {
#ifndef NDEBUG
cerr << "An UNDO transaction was started while a prior command was underway. Aborting command (" << g_quark_to_string (q) << ") and prior (" << _current_trans->name() << ")" << "\n";
#else
PBD::warning << "An UNDO transaction was started while a prior command was underway. Aborting command (" << g_quark_to_string (q) << ") and prior (" << _current_trans->name() << ")" << endmsg;
#endif
abort_reversible_command();
assert (false);
return;