mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-07-13 01:20:24 +02:00
use stream_error function for exceptions
This commit is contained in:
@ -98,15 +98,4 @@ def parse(data, raw=False, quiet=False):
|
||||
yield _process(output_line)
|
||||
|
||||
except Exception as e:
|
||||
if not quiet:
|
||||
e.args = (str(e) + '... Use the quiet option (-q) to ignore errors.',)
|
||||
raise e
|
||||
else:
|
||||
yield {
|
||||
'_meta':
|
||||
{
|
||||
'success': False,
|
||||
'error': 'error parsing line',
|
||||
'line': line.strip()
|
||||
}
|
||||
}
|
||||
yield jc.utils.stream_error(e, quiet, line)
|
||||
|
Reference in New Issue
Block a user