improve error message for parsing

This commit is contained in:
Ruben Fiszel
2022-08-06 08:45:37 +02:00
parent 0346d955f9
commit bc35a81bec
+3 -1
View File
@@ -157,7 +157,9 @@ pub fn parse_deno_signature(code: &str) -> error::Result<MainArgSignature> {
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;