Mercurial > hg > piper-cpp
comparison 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 |
comparison
equal
deleted
inserted
replaced
120:88ecaf8b163a | 121:56e537a7bb99 |
---|---|
57 { | 57 { |
58 LoadRequest req; | 58 LoadRequest req; |
59 req.pluginKey = pluginKey; | 59 req.pluginKey = pluginKey; |
60 req.inputSampleRate = inputSampleRate; | 60 req.inputSampleRate = inputSampleRate; |
61 req.adapterFlags = adapterFlags; | 61 req.adapterFlags = adapterFlags; |
62 LoadResponse resp = m_client.loadPlugin(req); | 62 try { |
63 m_plugin = resp.plugin; | 63 LoadResponse resp = m_client.loadPlugin(req); |
64 m_plugin = resp.plugin; | |
65 } catch (ServerCrashed c) { | |
66 std::cerr << c.what() << std::endl; | |
67 m_plugin = 0; | |
68 } | |
64 } | 69 } |
65 | 70 |
66 virtual ~AutoPlugin() { | 71 virtual ~AutoPlugin() { |
67 delete m_plugin; | 72 delete m_plugin; |
68 } | 73 } |