You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As cbor-diag tool becomes useful, I create CBOR binary from diagnostic notation and bring it to the automated processes.
When I make some mistakes, however, some commands such as diag2cbor.rb return status code 0 and print the error cause to stdout.
Thus these example commands seem success but the actual error messages are inside output cbor files.
$ echo"[],"| diag2cbor.rb > tailcomma.cbor
$ echo$?
0
$ cat tailcomma.cbor
*** can't parse [],*** Expected one of [ \t\n\r], "/", '"', '{', '[', [0-9], [-+], '0', 'Infinity', '-Infinity', 'NaN', 'false', 'true', 'null', 'undefined', 'simple(', "h'", "'", "b64'", [a-z], "<<", '(' at line 2, column 1 (byte 5) after ,$ echo "[0:1]" | diag2cbor.rb > colon_in_array.cbor$ echo $?0$ cat colon_in_array.cbor*** can't parse [0:1]
*** Expected one of [0-9], '(', [xX], [oO], [bB], '.', [Ee], [ \t\n\r], "/", ',', ']' at line 1, column 3 (byte 3) after [0
Can we change them to return non-zero value and to print error messages to stderr?
The text was updated successfully, but these errors were encountered:
As cbor-diag tool becomes useful, I create CBOR binary from diagnostic notation and bring it to the automated processes.
When I make some mistakes, however, some commands such as
diag2cbor.rb
return status code 0 and print the error cause to stdout.Thus these example commands seem success but the actual error messages are inside output cbor files.
Can we change them to return non-zero value and to print error messages to stderr?
The text was updated successfully, but these errors were encountered: