Skip to content

Commit b822412

Browse files
committed
Improve the unresolved table error message
1 parent ed2aef5 commit b822412

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

crates/gitql-parser/src/parser.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,8 @@ fn parse_describe_query(
177177
{
178178
return Err(
179179
Diagnostic::error(&format!("Unresolved table name `{}`", table_name))
180-
.add_help("You can use the command `SHOW TABLES` to get list of current tables")
180+
.add_help("You can use the `SHOW TABLES` query to get list of current tables")
181+
.add_help("Check the documentations to see available tables")
181182
.with_location(calculate_safe_location(tokens, *position))
182183
.as_boxed(),
183184
);
@@ -808,6 +809,7 @@ fn parse_from_option(
808809
.contains_key(table_name.as_str())
809810
{
810811
return Err(Diagnostic::error("Unresolved table name")
812+
.add_help("You can use the `SHOW TABLES` query to get list of current tables")
811813
.add_help("Check the documentations to see available tables")
812814
.with_location(tokens[*position - 1].location)
813815
.as_boxed());

0 commit comments

Comments
 (0)