diff --git a/src/modules/condition/failed.rs b/src/modules/condition/failed.rs index 915a72ea..1f3f3bd0 100644 --- a/src/modules/condition/failed.rs +++ b/src/modules/condition/failed.rs @@ -61,7 +61,7 @@ impl SyntaxModule for Failed { self.is_parsed = true; return Ok(()); } else { - return error!(meta, tok, "Failed expression must be followed by a block or statement") + return error!(meta, tok, format!("The function '{}' requires a 'failed' block or statement to handle errors", meta.get_token_at(meta.get_index() - 4).unwrap().word)) } } }