Mercurial > hg > piper-cpp
diff vamp-client/AutoPlugin.h @ 121:56e537a7bb99
Error handling
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Thu, 27 Oct 2016 14:01:35 +0100 |
parents | 5876f3e9c677 |
children | 3dcf0394971d |
line wrap: on
line diff
--- a/vamp-client/AutoPlugin.h Thu Oct 27 13:42:07 2016 +0100 +++ b/vamp-client/AutoPlugin.h Thu Oct 27 14:01:35 2016 +0100 @@ -59,8 +59,13 @@ req.pluginKey = pluginKey; req.inputSampleRate = inputSampleRate; req.adapterFlags = adapterFlags; - LoadResponse resp = m_client.loadPlugin(req); - m_plugin = resp.plugin; + try { + LoadResponse resp = m_client.loadPlugin(req); + m_plugin = resp.plugin; + } catch (ServerCrashed c) { + std::cerr << c.what() << std::endl; + m_plugin = 0; + } } virtual ~AutoPlugin() {