Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Error reporting into stderr stream #509

Closed
valery1707 opened this issue Jan 14, 2019 · 3 comments
Closed

Error reporting into stderr stream #509

valery1707 opened this issue Jan 14, 2019 · 3 comments
Milestone

Comments

@valery1707
Copy link

valery1707 commented Jan 14, 2019

If I try to compile KSY with errors, than compiler set exit status to 2 and show in console messages about discovered problems.
But this messages will be printed into stdout process's stream, while I expect them in stderr.

Demo KSY:

meta:
  id: demo
  file-extension: demo
  endian: le
seq:
  - id: header
    type: header
types:
  header:
    seq:
      - id: Magic
        contents: 'DEMO'

Compiler message: /types/header/seq/0/id: invalid attribute ID: 'Magic', expected /^[a-z][a-z0-9_]*$/

@GreyCat GreyCat transferred this issue from kaitai-io/kaitai_struct_compiler Jan 14, 2019
@GreyCat
Copy link
Member

GreyCat commented Jan 14, 2019

Probably a valid assumption, shouldn't be hard to fix.
Please note, though, that for machine-readable error log, it's preferable to use --ksc-json-output.

@GreyCat
Copy link
Member

GreyCat commented Jan 25, 2019

Here we go: kaitai-io/kaitai_struct_compiler@baed612

Please take a look and see if it works for you.

@GreyCat
Copy link
Member

GreyCat commented Feb 10, 2019

Works for me, no reply in 2 weeks => hopefully works for you too.

@GreyCat GreyCat closed this as completed Feb 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants