uber-node / tcurl

A command line utility to talk to tchannel servers
MIT License
36 stars 7 forks source link

When passing invalid thrift to tcurl it does not print line number #84

Closed Raynos closed 8 years ago

Raynos commented 8 years ago

I get output like:

$ tcurl -t ./benchmarks/benchmark.thrift -p 127.0.0.1:21300 a b

undefined:6350
      throw peg$buildException(null, peg$maxFailExpected, peg$maxFailPos);
            ^
SyntaxError: Expected "/*", "0x", "=", "xsd_attributes", "xsd_nillable", "xsd_optional", "}", [+\-], [0-9], comment, end of line, list separator or whitespace but "." found.

it tells me the line number of the pegjs grammar but not the line number in the thrift file.

For this concrete error I left a ... in a struct definition to remind myself to add more things.

kriskowal commented 8 years ago

PEG SyntaxError instances have that information. We’ll surface it.