Mercurial > hg > piper-cpp
diff vamp-client/SynchronousTransport.h @ 121:56e537a7bb99
Error handling
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Thu, 27 Oct 2016 14:01:35 +0100 |
parents | ff3fd8d1b2dc |
children | 2004ec2b653e |
line wrap: on
line diff
--- a/vamp-client/SynchronousTransport.h Thu Oct 27 13:42:07 2016 +0100 +++ b/vamp-client/SynchronousTransport.h Thu Oct 27 14:01:35 2016 +0100 @@ -38,6 +38,7 @@ #include <vector> #include <cstdlib> +#include <stdexcept> namespace piper_vamp { namespace client { @@ -50,6 +51,12 @@ virtual bool isComplete(const std::vector<char> &message) const = 0; }; +class ServerCrashed : public std::runtime_error +{ +public: + ServerCrashed() : std::runtime_error("Piper server exited unexpectedly") {} +}; + class SynchronousTransport // interface { public: