diff 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
line wrap: on
line diff
--- a/vamp-capnp/VampnProto.h	Fri Jan 20 22:24:11 2017 +0000
+++ b/vamp-capnp/VampnProto.h	Fri Jan 20 22:24:44 2017 +0000
@@ -874,7 +874,13 @@
         }
 
         e.setCode(0);
-        e.setMessage(std::string("error in ") + type + " request: " + errorText);
+
+        if (responseType == RRType::NotValid) {
+            e.setMessage(errorText);
+        } else {
+            e.setMessage
+                (std::string("error in ") + type + " request: " + errorText);
+        }
     }
 
     static void