From bc35a81bec0d16eefb6df47de7d36ca940553740 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Sat, 6 Aug 2022 08:45:37 +0200 Subject: [PATCH] improve error message for parsing --- backend/src/parser.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/src/parser.rs b/backend/src/parser.rs index 0271cb668d..979134abc0 100644 --- a/backend/src/parser.rs +++ b/backend/src/parser.rs @@ -157,7 +157,9 @@ pub fn parse_deno_signature(code: &str) -> error::Result { let ast = parser .parse_module() .map_err(|e| { - error::Error::ExecutionErr(format!("impossible to parse module: {err_s}\n{e:?}")) + error::Error::ExecutionErr(format!( + "Error while parsing code, it is invalid typescript" + )) })? .body;