api_set_error: include expression with "Failed to evaluate expression" (#11713)

This commit is contained in:
Daniel Hahler
2020-01-15 09:08:22 +01:00
committed by GitHub
parent f86acd213b
commit 8ba3354d74

View File

@@ -443,7 +443,8 @@ Object nvim_eval(String expr, Error *err)
if (!try_end(err)) {
if (ok == FAIL) {
// Should never happen, try_end() should get the error. #8371
api_set_error(err, kErrorTypeException, "Failed to evaluate expression");
api_set_error(err, kErrorTypeException,
"Failed to evaluate expression: '%.*s'", 256, expr.data);
} else {
rv = vim_to_object(&rettv);
}