summaryrefslogtreecommitdiff
path: root/test_util/src
diff options
context:
space:
mode:
Diffstat (limited to 'test_util/src')
-rw-r--r--test_util/src/lsp.rs11
1 files changed, 10 insertions, 1 deletions
diff --git a/test_util/src/lsp.rs b/test_util/src/lsp.rs
index 92dc98102..948dc4da6 100644
--- a/test_util/src/lsp.rs
+++ b/test_util/src/lsp.rs
@@ -122,7 +122,16 @@ where
R: de::DeserializeOwned,
{
let maybe_params = match maybe_params {
- Some(params) => Some(serde_json::from_value(params)?),
+ Some(params) => {
+ Some(serde_json::from_value(params.clone()).map_err(|err| {
+ anyhow::anyhow!(
+ "Could not deserialize message '{}': {}\n\n{:?}",
+ method,
+ err,
+ params
+ )
+ })?)
+ }
None => None,
};
Ok((method, maybe_params))