Skip to content

Commit

Permalink
Add full error msg to output yaml file in example-queries
Browse files Browse the repository at this point in the history
  • Loading branch information
tanmay-9 committed Feb 20, 2025
1 parent 8a02fba commit 11fca70
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/qlever/commands/example_queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,8 @@ def get_json_error_msg(e: Exception) -> dict[str, str]:
except Exception as e:
error_msg = get_json_error_msg(e)

error_msg_for_yaml = {}

# Print description, time, result in tabular form.
if len(description) > width_query_description:
description = (
Expand All @@ -627,6 +629,8 @@ def get_json_error_msg(e: Exception) -> dict[str, str]:
query_times.append(time_seconds)
result_sizes.append(result_size)
else:
for key in error_msg.keys():
error_msg_for_yaml[key] = error_msg[key]
num_failed += 1
if (
args.width_error_message > 0
Expand Down Expand Up @@ -669,7 +673,9 @@ def get_json_error_msg(e: Exception) -> dict[str, str]:
else result_length
)
results_for_yaml = (
error_msg if error_msg is not None else result_file
error_msg_for_yaml
if error_msg is not None
else result_file
)
yaml_record = self.get_record_for_yaml(
query=description,
Expand Down

0 comments on commit 11fca70

Please sign in to comment.