Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: catch compile errors #16

Merged
merged 1 commit into from
Jun 16, 2020
Merged

Conversation

diafour
Copy link
Contributor

@diafour diafour commented Jun 16, 2020

jq_compile prints errors to the stderr by default:

jq: error: syntax error, unexpected QQSTRING_START, expecting '}' (Unix shell quoting issues?) at <top-level>, line 3:
  "message": .message",                     
jq: 1 compile error

This behavior interferes with logging, especially when JSON logging is turned on. Given PR implements a callback that catches errors into jv_array. Now compile errors can be returned as a usual error.

@diafour diafour force-pushed the fix_catch_jq_errors_in_stderr branch from 74326df to 95b4a27 Compare June 16, 2020 11:35
@diafour diafour merged commit 907039e into master Jun 16, 2020
@diafour diafour deleted the fix_catch_jq_errors_in_stderr branch June 16, 2020 16:26
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant