Mercurial > hg > svcore
changeset 1234:2d9e2771805a project-file-rework
Error handling
author | Chris Cannam |
---|---|
date | Thu, 27 Oct 2016 14:01:35 +0100 |
parents | fac1666e429b |
children | 7f4230e7d83a |
files | plugin/PiperVampPluginFactory.cpp |
diffstat | 1 files changed, 10 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/plugin/PiperVampPluginFactory.cpp Thu Oct 27 12:06:14 2016 +0100 +++ b/plugin/PiperVampPluginFactory.cpp Thu Oct 27 14:01:35 2016 +0100 @@ -148,9 +148,17 @@ errorMessage = QObject::tr("Could not start external plugin host"); return; } - + piper_vamp::client::CapnpRRClient client(&transport); - piper_vamp::ListResponse lr = client.listPluginData(); + piper_vamp::ListResponse lr; + + try { + lr = client.listPluginData(); + } catch (piper_vamp::client::ServerCrashed) { + errorMessage = QObject::tr + ("External plugin host exited unexpectedly while listing plugins"); + return; + } for (const auto &pd: lr.available) {