13
0

WS: add some meaningful error messages

This commit is contained in:
Luciano Iam 2020-08-29 17:16:38 +02:00 committed by Robin Gareus
parent 3509fe1589
commit 7521d8ab6f
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -16,6 +16,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <boost/lexical_cast.hpp>
#include "ardour/dB.h"
#include "ardour/meter.h"
#include "ardour/plugin_insert.h"
@ -99,7 +101,8 @@ ArdourMixerPlugin::param_control (uint32_t param_n) const
uint32_t control_id = plugin->nth_parameter (param_n, ok);
if (!ok || !plugin->parameter_is_input (control_id)) {
throw ArdourMixerNotFoundException("invalid automation control");
throw ArdourMixerNotFoundException("invalid automation control for param id = "
+ boost::lexical_cast<std::string>(param_n));
}
return _insert->automation_control (Evoral::Parameter (PluginAutomation, 0, control_id));
@ -158,7 +161,7 @@ ArdourMixerStrip::nth_plugin (uint32_t plugin_n)
return _plugins[plugin_n];
}
throw ArdourMixerNotFoundException (""/*"Plugin with ID " + plugin_n + " not found"*/);
throw ArdourMixerNotFoundException ("plugin id = " + boost::lexical_cast<std::string>(plugin_n) + " not found");
}
double
@ -178,8 +181,7 @@ ArdourMixerStrip::pan () const
{
boost::shared_ptr<AutomationControl> ac = _stripable->pan_azimuth_control ();
if (!ac) {
/* TODO: inform GUI that strip has no panner */
return 0;
throw ArdourMixerNotFoundException ("strip has no panner");
}
return ac->internal_to_interface (ac->get_value ());
}
@ -290,7 +292,7 @@ ArdourMixer::nth_strip (uint32_t strip_n)
return _strips[strip_n];
}
throw ArdourMixerNotFoundException (""/*"Strip with ID " + strip_n + " not found"*/);
throw ArdourMixerNotFoundException ("strip id = " + boost::lexical_cast<std::string>(strip_id) + " not found");
}
void