comparison vamp-capnp/VampnProto.h @ 158:0876b5e67afe

Improve error handling and extend tests for it
author Chris Cannam <cannam@all-day-breakfast.com>
date Fri, 20 Jan 2017 22:24:44 +0000
parents 5b113c87b6e6
children 590b1a1fd955
comparison
equal deleted inserted replaced
157:5699fca64251 158:0876b5e67afe
872 } else { 872 } else {
873 type = "invalid"; 873 type = "invalid";
874 } 874 }
875 875
876 e.setCode(0); 876 e.setCode(0);
877 e.setMessage(std::string("error in ") + type + " request: " + errorText); 877
878 if (responseType == RRType::NotValid) {
879 e.setMessage(errorText);
880 } else {
881 e.setMessage
882 (std::string("error in ") + type + " request: " + errorText);
883 }
878 } 884 }
879 885
880 static void 886 static void
881 buildRpcResponse_Exception(piper::RpcResponse::Builder &b, 887 buildRpcResponse_Exception(piper::RpcResponse::Builder &b,
882 const std::exception &e, 888 const std::exception &e,