diff options
| author | Michael Williamson <mike@zwobble.org> | 2013-06-19 21:08:03 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2013-06-19 21:08:03 +0100 |
| commit | bb51ca65feeb8f579c9b630321c0d30133119162 (patch) | |
| tree | a473d4d21da82f9249df3729e78362287b5ac5ae /jq.pyx | |
| parent | f75fba3e2f8f6fdb4905636b92338ddb8365c381 (diff) | |
Raise ValueError if program is invalid
Diffstat (limited to 'jq.pyx')
| -rw-r--r-- | jq.pyx | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -67,6 +67,9 @@ def _string_to_strings(char* program, char* input): # TODO: error if !compiled cdef int compiled = jq_compile(jq, program) + if not compiled: + raise ValueError("program was not valid") + cdef jv_parser parser jv_parser_init(&parser) # TODO: is len a suitable replacement for strlen (unicode)? |
